1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

Merge from origin/emacs-28

3b8dda6c90 Add safety check in x_menu_show
e1fb731393 Tweak x_connection_closed when I/O error
595e506c82 * lisp/erc/erc.el (erc-user-mode): Set "+i" by default.
d00f3d4c05 Port unused decls to C2x
317eb2d5b5 Improve structure of TODO
c0793cd9de Don't use some obsolete names in documentation
87153cc915 Tweak x_hide_tip for consistency
7e871dcd27 Remove encode_terminal_code UNINITs
2a00634880 Port pdumper.c maybe_unused to C2x
6d9b3c0eaa Port systhreads.h to C2x
fd274d7d24 Pacify -Wanalyzer-null-argument in lisp_malloc
cc3fc94f09 Pacify gcc 11.2.1 -Wanalyzer-null-argument
d3a832a61a Simplify hack-read-symbol-shorthands again (bug#50946)
4831426158 Fix recipe for 'native-lisp' directory
0bb42ef803 ; * lisp/time-stamp.el (time-stamp-format): Doc string.
732c70a0d9 Simplify socket symlink-attack checking
fc32a3bd95 ; * doc/lispref/files.texi (Reading from Files): Fix wording.
3cc77aa976 Clarify (elisp) insert-file-contents with BEG or END not o...
5deeb0947d * src/Makefile.in: Simplify conditionals.
121a5abeae Move context-menu selection items Defun/List/Symbol to pro...
0c341e6e84 * lisp/tab-bar.el (tab-bar-detach-tab): Handle frame selec...
931a7276c0 * lisp/tab-line.el (tab-line-format): Add face-modified to...
3863919a00 Fix unmounting in Tramp
7a6d34cd1f * etc/themes/light-blue-theme.el: Add "Maintainer: emacs-d...
c1b1e1f545 Define HAVE_NATIVE_COMP in src/Makefile.in
137fa2d716 Rename elisp-shorthands to read-symbol-shorthands
e6fbc45b7b Font-lock shorthands in elisp-mode for quick visual recogn...
17e6f3bee5 ; Fix last change in tramp-sshfs.el
3dae1e33d1 Suppress superfluous error messages in Tramp
b228ec9fab Fix reading the tail of a file in shorthands.el
7fb2789509 Fix substitution of pretty quotes in code in easy-mmode
b47d7ce1b8 Fix agent directory deletion
b1a8a66fb0 ; * etc/TODO: Fix previous commit; delete the right thing.
6c01a21365 Clarify the purpose of internal--format-docstring-line
55dadbc57e * lisp/net/dictionary.el (context-menu-dictionary): Move m...
bb209cd5ab Update to Org 9.5-30-g10dc9d
4341e79a5f Remove bogus ":safe t" custom properties
b6f6b593c6 Fix 'apropos-compact-layout'
62d6cecfcd Remove bogus ":safe nil" custom properties
f9111d8784 The safe-local-variable property is a function (bug#50944)
3dc094abee ; Some minor tweaks to TODO
a5b4356d37 Revert "; * etc/TODO: Move elpa.gnu.org items to the end."
7bc0cee115 Revert "* etc/TODO: Rearrange to start with "Simple tasks"."
3489471417 Fix selection of fonts for Arabic on Posix platforms
13e5943386 ; Fix a typo in a doc string
bd60fca2fa Fix ox-koma-letter compilation warnings
340e527bed Preload paren.el
a9052248da Improve documentation of 'shift-select-mode'
d505971894 ; Standardize some license headers
9307889d68 Simplify shorthand injection (bug#50946)
5c77cc9584 ; * admin/release-branch.txt: Tweak previous.

# Conflicts:
#	etc/NEWS
#	test/lisp/subr-tests.el
This commit is contained in:
Glenn Morris 2021-10-04 08:13:11 -07:00
commit e0fdb68f8c
85 changed files with 1669 additions and 472 deletions

View File

@ -84,7 +84,7 @@ generate a new report. The only time to send mail to the bug list
address is to create a new report.
Gnus users can add the following to message-dont-reply-to-names;
similarly with Rmail and rmail-dont-reply-to-names:
similarly with Rmail and mail-dont-reply-to-names:
"\\(emacs-pretest-bug\\|bug-gnu-emacs\\|bug-\\(e\\|gnu\\)macs\\)@gnu\\.org\\|\
\\(submit\\|control\\|owner\\)@debbugs\\.gnu\\.org"

View File

@ -474,7 +474,7 @@ THINGS TO DO
definition.
Exceptions found so far: x-select-text and
x-cut-buffer-or-selection-value.
x-selection-value (old name: x-cut-buffer-or-selection-value).
** Have a look at fatal_error_hook.

View File

@ -3,7 +3,8 @@ Instructions for cutting the Emacs release branch
1. In the clone of the Emacs Git repository, switch to the 'master'
branch, "git pull", and build it (using 'make bootstrap') to make
sure it's not broken. Run 'make check-expensive' and ensure all
tests pass.
tests pass. (Alternatively, verify that the automated build
servers are showing success for the latest revision.)
2. Create the release branch and switch to it. Assuming that it is
for releasing Emacs versions XY.1, XY.2, etc., the command is:

View File

@ -409,9 +409,14 @@ region by dragging the mouse, you can continue to extend the region
using shifted cursor motion commands. In either case, any unshifted
cursor motion command deactivates the mark.
@vindex shift-select-mode
To turn off shift-selection, set @code{shift-select-mode} to
@code{nil}. Doing so does not disable setting the mark via mouse
commands.
commands. If you set @code{shift-select-mode} to the value
@code{permanent}, cursor motion keys that were not shift-translated
will not deactivate the mark, so, for example, the region set by prior
commands can be extended by shift-selection, and unshifted cursor
motion keys will extend the region set by shift-selection.
@node Disabled Transient Mark
@section Disabling Transient Mark Mode

View File

@ -4201,7 +4201,7 @@ times.
The part of the buffer between point and mark is called @dfn{the
region}. Numerous commands work on the region, including
@code{center-region}, @code{count-lines-region}, @code{kill-region}, and
@code{center-region}, @code{count-words-region}, @code{kill-region}, and
@code{print-region}.
The @code{save-excursion} special form saves the location of point and
@ -4214,7 +4214,7 @@ evaluated.
In Emacs, a function frequently moves point as part of its internal
workings even though a user would not expect this. For example,
@code{count-lines-region} moves point. To prevent the user from being
@code{count-words-region} moves point. To prevent the user from being
bothered by jumps that are both unexpected and (from the user's point of
view) unnecessary, @code{save-excursion} is often used to keep point in
the location expected by the user. The use of
@ -13473,8 +13473,7 @@ The template for an interactive function definition is, as always:
What we need to do is fill in the slots.
The name of the function should be self-explanatory and similar to the
existing @code{count-lines-region} name. This makes the name easier
The name of the function should be self-explanatory and easy
to remember. @code{count-words-region} is the obvious choice. Since
that name is now used for the standard Emacs command to count words, we
will name our implementation @code{@value{COUNT-WORDS}}.

View File

@ -563,7 +563,17 @@ In this case, @var{visit} must be @code{nil}. For example,
@end example
@noindent
inserts the first 500 characters of a file.
inserts the characters coded by the first 500 bytes of a file.
If @var{beg} or @var{end} happens to be in the middle of a character's
multibyte sequence, Emacs's character code conversion will insert one
or more eight-bit characters (a.k.a.@: ``raw bytes'')
(@pxref{Character Sets}) into the buffer. If you want to read part of
a file this way, we recommend to bind @code{coding-system-for-read} to
a suitable value around the call to this function (@pxref{Specifying
Coding Systems}), and to write Lisp code which will check for raw
bytes at the boundaries, read the entire sequence of these bytes, and
convert them back to valid characters.
If the argument @var{replace} is non-@code{nil}, it means to replace the
contents of the buffer (actually, just the accessible portion) with the
@ -577,10 +587,11 @@ with @code{insert-file-contents}, as long as @var{replace} and
@end defun
@defun insert-file-contents-literally filename &optional visit beg end replace
This function works like @code{insert-file-contents} except that it
does not run @code{after-insert-file-functions}, and does not do
format decoding, character code conversion, automatic uncompression,
and so on.
This function works like @code{insert-file-contents} except that each
byte in the file is handled separately, being converted into an
eight-bit character if needed. It does not run
@code{after-insert-file-functions}, and does not do format decoding,
character code conversion, automatic uncompression, and so on.
@end defun
If you want to pass a file name to another process so that another

View File

@ -262,7 +262,6 @@ after-set-visited-file-name-hook
auto-coding-functions
choose-completion-string-functions
completing-read-function
completion-annotate-function
completion-at-point-functions
completion-list-insert-choice-function
deactivate-current-input-method-function

View File

@ -666,7 +666,7 @@ different things. However, this practice commonly originates very
long symbols names, which are inconvenient to type and read after a
while. Shorthands solve these issues in a clean way.
@defvar elisp-shorthands
@defvar read-symbol-shorthands
This variable's value is an alist whose elements have the form
@code{(@var{shorthand-prefix} . @var{longhand-prefix})}. Each element
instructs the Lisp reader to read every symbol form which starts with
@ -704,7 +704,7 @@ alleviate that.
(snu-split "\\(\r\n\\|[\n\r]\\)" s))
;; Local Variables:
;; elisp-shorthands: (("snu-" . "some-nice-string-utils-"))
;; read-symbol-shorthands: (("snu-" . "some-nice-string-utils-"))
;; End:
@end lisp
@ -719,19 +719,19 @@ waiting for ElDoc (@pxref{Lisp Doc, , Local Variables in Files, emacs,
The GNU Emacs Manual}) to hint at the true full name of the symbol
under point in the echo area.
Since @code{elisp-shorthands} is a file-local variable, it is possible
that multiple libraries depending on
Since @code{read-symbol-shorthands} is a file-local variable, it is
possible that multiple libraries depending on
@file{some-nice-string-utils-lines.el} refer to the same symbols under
@emph{different} shorthands, or not using shorthands at all. In the
next example, the @file{my-tricks.el} library refers to the
symbol @code{some-nice-string-utils-lines} using the
@code{sns-} prefix instead of @code{snu-}.
next example, the @file{my-tricks.el} library refers to the symbol
@code{some-nice-string-utils-lines} using the @code{sns-} prefix
instead of @code{snu-}.
@example
(defun t-reverse-lines (s) (string-join (reverse (sns-lines s)) "\n")
;; Local Variables:
;; elisp-shorthands: (("t-" . "my-tricks-")
;; ("sns-" . "some-nice-string-utils-"))
;; read-symbol-shorthands: (("t-" . "my-tricks-")
;; ("sns-" . "some-nice-string-utils-"))
;; End:
@end example

View File

@ -4136,9 +4136,6 @@ You can get the old behavior by binding @kbd{SPC} to
@lisp
(define-key minibuffer-local-filename-completion-map (kbd "SPC")
'minibuffer-complete-word)
(define-key minibuffer-local-filename-must-match-map (kbd "SPC")
'minibuffer-complete-word)
@end lisp
@c ------------------------------------------------------------

View File

@ -13875,11 +13875,9 @@ present in this hook.
@item nntp-authinfo-function
@vindex nntp-authinfo-function
@findex nntp-send-authinfo
@vindex nntp-authinfo-file
This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
server. The default function is @code{nntp-send-authinfo}, which looks
through your @file{~/.authinfo} (or whatever you've set the
@code{nntp-authinfo-file} variable to) for applicable entries. If none
through your @file{~/.authinfo} for applicable entries. If none
are found, it will prompt you for a login name and a password. The
format of the @file{~/.authinfo} file is (almost) the same as the
@code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}

View File

@ -658,9 +658,9 @@ variable @code{reftex-auto-recenter-toc}.
@end table
@vindex reftex-toc-map
@vindex reftex-toc-mode-map
In order to define additional commands for the @file{*toc*} buffer, the
keymap @code{reftex-toc-map} may be used.
keymap @code{reftex-toc-mode-map} may be used.
@findex reftex-toc-recenter
@vindex reftex-auto-recenter-toc
@ -1021,9 +1021,9 @@ document and let you select a label from there (@pxref{LaTeX xr Package,,xr}).
@end table
@vindex reftex-select-label-map
@vindex reftex-select-label-mode-map
In order to define additional commands for the selection process, the
keymap @code{reftex-select-label-map} may be used.
keymap @code{reftex-select-label-mode-map} may be used.
@node Builtin Label Environments
@section Builtin Label Environments
@ -1871,9 +1871,9 @@ entries.
@end table
@vindex reftex-select-bib-map
@vindex reftex-select-bib-mode-map
In order to define additional commands for this selection process, the
keymap @code{reftex-select-bib-map} may be used.
keymap @code{reftex-select-bib-mode-map} may be used.
Note that if you do not use Emacs to edit the @BibTeX{} database files,
@RefTeX{} will ask if the related buffers should be updated once it
@ -3960,7 +3960,7 @@ Normal hook which is run when a @file{*toc*} buffer is
created.
@end deffn
@deffn Keymap reftex-toc-map
@deffn Keymap reftex-toc-mode-map
The keymap which is active in the @file{*toc*} buffer.
(@pxref{Table of Contents}).
@end deffn
@ -4425,7 +4425,7 @@ Normal hook which is run when a selection buffer enters
@code{reftex-select-label-mode}.
@end deffn
@deffn Keymap reftex-select-label-map
@deffn Keymap reftex-select-label-mode-map
The keymap which is active in the labels selection process
(@pxref{Referencing Labels}).
@end deffn
@ -4586,7 +4586,7 @@ Normal hook which is run when a selection buffer enters
@code{reftex-select-bib-mode}.
@end deffn
@deffn Keymap reftex-select-bib-map
@deffn Keymap reftex-select-bib-mode-map
The keymap which is active in the citation-key selection process
(@pxref{Creating Citations}).
@end deffn
@ -4792,7 +4792,7 @@ into blocks. Sorting will then preserve blocks, so that lines are
re-arranged only within blocks.
@end defopt
@defopt reftex-index-phrases-map
@defopt reftex-index-phrases-mode-map
Keymap for the Index Phrases buffer.
@end defopt
@ -4824,7 +4824,7 @@ the document. This flag can be toggled from within the @file{*Index*}
buffer with the @kbd{f} key.
@end defopt
@deffn Keymap reftex-index-map
@deffn Keymap reftex-index-mode-map
The keymap which is active in the @file{*Index*} buffer
(@pxref{Index Support}).
@end deffn
@ -5813,8 +5813,8 @@ buffer).
@noindent @b{Version 3.12}
@itemize @bullet
@item
There are 3 new keymaps for customization: @code{reftex-toc-map},
@code{reftex-select-label-map}, @code{reftex-select-bib-map}.
There are 3 new keymaps for customization: @code{reftex-toc-mode-map},
@code{reftex-select-label-mode-map}, @code{reftex-select-bib-mode-map}.
@item
Refontification uses more standard font-lock stuff.
@item

View File

@ -896,7 +896,7 @@ augmented with speedbar.
@enumerate
@item
Create the keymap variable @code{@var{name}-speedbar-key-map}.
Create the keymap variable @code{@var{name}-speedbar-mode-map}.
@item
Create a function, named whatever you like, which assigns values into your
@ -904,7 +904,7 @@ keymap. Use this command to create the keymap before assigning
bindings:
@smallexample
(setq @var{name}-speedbar-key-map (speedbar-make-specialized-keymap))
(setq @var{name}-speedbar-mode-map (speedbar-make-specialized-keymap))
@end smallexample
This function creates a special keymap for use in speedbar.
@ -977,7 +977,7 @@ Next, register your extension like this;
@example
(speedbar-add-expansion-list '("MyExtension"
MyExtension-speedbar-menu-items
MyExtension-speedbar-key-map
MyExtension-speedbar-mode-map
MyExtension-speedbar-buttons))
@end example

View File

@ -2629,6 +2629,11 @@ Example:
@end group
@end lisp
@vindex tramp-fuse-unmount-on-cleanup
The user option @code{tramp-fuse-unmount-on-cleanup}, when set to
non-@code{nil}, controls, whether a mount point is unmounted on
connection cleanup or on Emacs exiting.
@anchor{Setup of rclone method}
@subsection @option{rclone} setup

View File

@ -989,11 +989,12 @@ further tweak whether to complete or indent.
---
** 'indent-tabs-mode' is now a global minor mode instead of just a variable.
---
+++
** New choice 'permanent' for 'shift-select-mode'.
When the mark was activated by shifted motion keys, non-shifted motion
keys don't deactivate the mark after customizing 'shift-select-mode'
to 'permanent'.
to 'permanent'. Similarly, the active mark will not be deactivated by
typing shifted motion keys.
+++
** The "Edit => Clear" menu item now obeys a rectangular region.

View File

@ -29,6 +29,27 @@ are the ones we consider more important, but these also may be
difficult to fix. Bugs with severity "minor" may be simpler, but this
is not always true.
* High Priority Items
** Things related to elpa.gnu.org.
We need to figure out how to best include GNU ELPA packages in the
Emacs tarball before doing any of the items below.
*** Move idlwave to elpa.gnu.org
Need to sync up the Emacs and external versions.
See <https://lists.gnu.org/r/emacs-devel/2014-07/msg00008.html>
<https://debbugs.gnu.org/39992>
*** Move Org mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2014-08/msg00300.html>
<https://lists.gnu.org/r/emacs-devel/2014-11/msg00257.html>
*** Move verilog-mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
*** Move vhdl-mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
* Simple tasks
These don't require much Emacs knowledge and are suitable for anyone
from beginners to experts.
@ -168,7 +189,7 @@ defsubst can often end up generating things like
(let ((arg actual)) (body)) but should additionally get optimized further
when 'actual' is a constant/copyable expression.
*** Add an "indirect goto" byte-code
** Add an "indirect goto" byte-code
Such a byte-code can be used for local lambda expressions.
E.g. when you have code like
@ -339,6 +360,11 @@ should invoke the 'shape' method. 'hbfont_shape' should be extended
to pass to 'hb_shape_full' the required array of features, as
mentioned in the above HarfBuzz discussion.
** Concurrency
Stefan Monnier writes: "Including it as an 'experimental' compile-time
option sounds good. Of course there might still be big questions
around 'which form of concurrency' we'll want."
** Better support for displaying Emoji
Emacs is capable of displaying Emoji and some of the Emoji sequences,
provided that its fontsets are configured with a suitable font. To
@ -446,15 +472,6 @@ consistency checks that make sure the new code computes the same results
as the old code. And once that works well, we can remove the old code
and old fields.
** Better support for dynamic embedded graphics
I like this idea (my mpc.el code could use it for the volume widget),
though I wonder if the resulting efficiency will be sufficient.
** Concurrency
Including it as an "experimental" compile-time option sounds good. Of
course there might still be big questions around "which form of
concurrency" we'll want.
** FFI (foreign function interface)
See eg https://lists.gnu.org/r/emacs-devel/2013-10/msg00246.html
@ -625,6 +642,13 @@ could also be a button that you could use to view the advice.
** Add a function to get the insertion-type of the markers in an overlay
** Improve VC
Yes, there's a lot of work to be done there :-(
** Improve the "code snippets" support
Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then
advertise/use/improve it.
** ange-ftp
*** Make ange-ftp understand sftp
@ -862,17 +886,10 @@ The idea is to add an "X" of some kind, that when clicked deletes the
window associated with that modeline.
https://lists.gnu.org/r/emacs-devel/2007-09/msg02416.html
** Improve the "code snippets" support
Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then
advertise/use/improve it.
** Random things that were planned for Emacs-24
** Improve VC
Yes, there's a lot of work to be done there :-(
** Spread Semantic
** Random things that crossed Stefan Monnier's mind for Emacs 24
Stefan Monnier writes: "Some of them from my local hacks, but it's not
Stefan Monnier writes: "Random things that cross my mind right now
that I'd like to see. Some of them from my local hacks, but it's not
obvious at all whether they'll make it."
*** Prog-mode could/should provide a better fill-paragraph default
@ -1741,26 +1758,6 @@ Add a standard button-class named "link", and make all other link-like
button classes inherit from it. Set the default face of the "link"
button class to the standard "link" face.
* Things related to elpa.gnu.org.
We need to figure out how to best include GNU ELPA packages in the
Emacs tarball before doing any of the items below.
** Move idlwave to elpa.gnu.org
Need to sync up the Emacs and external versions.
See <https://lists.gnu.org/r/emacs-devel/2014-07/msg00008.html>
<https://debbugs.gnu.org/39992>
** Move Org mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2014-08/msg00300.html>
<https://lists.gnu.org/r/emacs-devel/2014-11/msg00257.html>
** Move verilog-mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
** Move vhdl-mode to elpa.gnu.org
See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
* Wishlist items
** Maybe replace etags.c with a Lisp implementation.

10
etc/org/csl/README Normal file
View File

@ -0,0 +1,10 @@
These data files are used by Org's oc-csl.el library.
LICENSE INFORMATION
chicago-author-date.csl
locales-en-US.xml
Both of these files are part of the Citation Style Language (CSL)
project (<https://citationstyles.org/>) and are released under the
Creative Commons Attribution-ShareAlike 3.0 Unported license.

View File

@ -0,0 +1,658 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago">
<info>
<title>Chicago Manual of Style 17th edition (author-date)</title>
<id>http://www.zotero.org/styles/chicago-author-date</id>
<link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
</author>
<contributor>
<name>Sebastian Karcher</name>
</contributor>
<contributor>
<name>Richard Karnesky</name>
<email>karnesky+zotero@gmail.com</email>
<uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
</contributor>
<contributor>
<name>Andrew Dunning</name>
<email>andrew.dunning@utoronto.ca</email>
<uri>https://orcid.org/0000-0003-0464-5036</uri>
</contributor>
<contributor>
<name>Matthew Roth</name>
<email>matthew.g.roth@yale.edu</email>
<uri> https://orcid.org/0000-0001-7902-6331</uri>
</contributor>
<contributor>
<name>Brenton M. Wiernik</name>
</contributor>
<category citation-format="author-date"/>
<category field="generic-base"/>
<summary>The author-date variant of the Chicago style</summary>
<updated>2018-01-24T12:00:00+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<terms>
<term name="editor" form="verb-short">ed.</term>
<term name="container-author" form="verb">by</term>
<term name="translator" form="verb-short">trans.</term>
<term name="editortranslator" form="verb">edited and translated by</term>
<term name="translator" form="short">trans.</term>
</terms>
</locale>
<macro name="secondary-contributors">
<choose>
<if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="none">
<group delimiter=". ">
<names variable="editor translator" delimiter=". ">
<label form="verb" text-case="capitalize-first" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
<names variable="director" delimiter=". ">
<label form="verb" text-case="capitalize-first" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</group>
</if>
</choose>
</macro>
<macro name="container-contributors">
<choose>
<if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<group prefix=", " delimiter=", ">
<names variable="container-author" delimiter=", ">
<label form="verb" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
<names variable="editor translator" delimiter=", ">
<label form="verb" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</group>
</if>
</choose>
</macro>
<macro name="editor">
<names variable="editor">
<name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=", "/>
</names>
</macro>
<macro name="translator">
<names variable="translator">
<name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=", "/>
</names>
</macro>
<macro name="recipient">
<choose>
<if type="personal_communication">
<choose>
<if variable="genre">
<text variable="genre" text-case="capitalize-first"/>
</if>
<else>
<text term="letter" text-case="capitalize-first"/>
</else>
</choose>
</if>
</choose>
<names variable="recipient" delimiter=", ">
<label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</macro>
<macro name="substitute-title">
<choose>
<if type="article-magazine article-newspaper review review-book" match="any">
<text macro="container-title"/>
</if>
</choose>
</macro>
<macro name="contributors">
<group delimiter=". ">
<names variable="author">
<name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=", "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<names variable="director"/>
<text macro="substitute-title"/>
<text macro="title"/>
</substitute>
</names>
<text macro="recipient"/>
</group>
</macro>
<macro name="contributors-short">
<names variable="author">
<name form="short" and="text" delimiter=", " initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<names variable="director"/>
<text macro="substitute-title"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="interviewer">
<names variable="interviewer" delimiter=", ">
<label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</macro>
<macro name="archive">
<group delimiter=". ">
<text variable="archive_location" text-case="capitalize-first"/>
<text variable="archive"/>
<text variable="archive-place"/>
</group>
</macro>
<macro name="access">
<group delimiter=". ">
<choose>
<if type="graphic report" match="any">
<text macro="archive"/>
</if>
<else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
<text macro="archive"/>
</else-if>
</choose>
<choose>
<if type="webpage post-weblog" match="any">
<date variable="issued" form="text"/>
</if>
</choose>
<choose>
<if variable="issued" match="none">
<group delimiter=" ">
<text term="accessed" text-case="capitalize-first"/>
<date variable="accessed" form="text"/>
</group>
</if>
</choose>
<choose>
<if type="legal_case" match="none">
<choose>
<if variable="DOI">
<text variable="DOI" prefix="https://doi.org/"/>
</if>
<else>
<text variable="URL"/>
</else>
</choose>
</if>
</choose>
</group>
</macro>
<macro name="title">
<choose>
<if variable="title" match="none">
<choose>
<if type="personal_communication" match="none">
<text variable="genre" text-case="capitalize-first"/>
</if>
</choose>
</if>
<else-if type="bill book graphic legislation motion_picture song" match="any">
<text variable="title" text-case="title" font-style="italic"/>
<group prefix=" (" suffix=")" delimiter=" ">
<text term="version"/>
<text variable="version"/>
</group>
</else-if>
<else-if variable="reviewed-author">
<choose>
<if variable="reviewed-title">
<group delimiter=". ">
<text variable="title" text-case="title" quotes="true"/>
<group delimiter=", ">
<text variable="reviewed-title" text-case="title" font-style="italic" prefix="Review of "/>
<names variable="reviewed-author">
<label form="verb-short" text-case="lowercase" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</group>
</group>
</if>
<else>
<group delimiter=", ">
<text variable="title" text-case="title" font-style="italic" prefix="Review of "/>
<names variable="reviewed-author">
<label form="verb-short" text-case="lowercase" suffix=" "/>
<name and="text" delimiter=", "/>
</names>
</group>
</else>
</choose>
</else-if>
<else-if type="legal_case interview patent" match="any">
<text variable="title"/>
</else-if>
<else>
<text variable="title" text-case="title" quotes="true"/>
</else>
</choose>
</macro>
<macro name="edition">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<choose>
<if is-numeric="edition">
<group delimiter=" " prefix=". ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short" strip-periods="true"/>
</group>
</if>
<else>
<text variable="edition" text-case="capitalize-first" prefix=". "/>
</else>
</choose>
</if>
<else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<choose>
<if is-numeric="edition">
<group delimiter=" " prefix=", ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition" prefix=", "/>
</else>
</choose>
</else-if>
</choose>
</macro>
<macro name="locators">
<choose>
<if type="article-journal">
<choose>
<if variable="volume">
<text variable="volume" prefix=" "/>
<group prefix=" (" suffix=")">
<choose>
<if variable="issue">
<text variable="issue"/>
</if>
<else>
<date variable="issued">
<date-part name="month"/>
</date>
</else>
</choose>
</group>
</if>
<else-if variable="issue">
<group delimiter=" " prefix=", ">
<text term="issue" form="short"/>
<text variable="issue"/>
<date variable="issued" prefix="(" suffix=")">
<date-part name="month"/>
</date>
</group>
</else-if>
<else>
<date variable="issued" prefix=", ">
<date-part name="month"/>
</date>
</else>
</choose>
</if>
<else-if type="legal_case">
<text variable="volume" prefix=", "/>
<text variable="container-title" prefix=" "/>
<text variable="page" prefix=" "/>
</else-if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group prefix=". " delimiter=". ">
<group>
<text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
<number variable="volume" form="numeric"/>
</group>
<group>
<number variable="number-of-volumes" form="numeric"/>
<text term="volume" form="short" prefix=" " plural="true"/>
</group>
</group>
</else-if>
<else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<choose>
<if variable="page" match="none">
<group prefix=". ">
<text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
<number variable="volume" form="numeric"/>
</group>
</if>
</choose>
</else-if>
</choose>
</macro>
<macro name="locators-chapter">
<choose>
<if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<choose>
<if variable="page">
<group prefix=", ">
<text variable="volume" suffix=":"/>
<text variable="page"/>
</group>
</if>
</choose>
</if>
</choose>
</macro>
<macro name="locators-article">
<choose>
<if type="article-newspaper">
<group prefix=", " delimiter=", ">
<group delimiter=" ">
<text variable="edition"/>
<text term="edition"/>
</group>
<group>
<text term="section" form="short" suffix=" "/>
<text variable="section"/>
</group>
</group>
</if>
<else-if type="article-journal">
<choose>
<if variable="volume issue" match="any">
<text variable="page" prefix=": "/>
</if>
<else>
<text variable="page" prefix=", "/>
</else>
</choose>
</else-if>
</choose>
</macro>
<macro name="point-locators">
<choose>
<if variable="locator">
<choose>
<if locator="page" match="none">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<choose>
<if variable="volume">
<group>
<text term="volume" form="short" suffix=" "/>
<number variable="volume" form="numeric"/>
<label variable="locator" form="short" prefix=", " suffix=" "/>
</group>
</if>
<else>
<label variable="locator" form="short" suffix=" "/>
</else>
</choose>
</if>
<else>
<label variable="locator" form="short" suffix=" "/>
</else>
</choose>
</if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<number variable="volume" form="numeric" suffix=":"/>
</else-if>
</choose>
<text variable="locator"/>
</if>
</choose>
</macro>
<macro name="container-prefix">
<text term="in" text-case="capitalize-first"/>
</macro>
<macro name="container-title">
<choose>
<if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
<text macro="container-prefix" suffix=" "/>
</if>
</choose>
<choose>
<if type="webpage">
<text variable="container-title" text-case="title"/>
</if>
<else-if type="legal_case" match="none">
<group delimiter=" ">
<text variable="container-title" text-case="title" font-style="italic"/>
<choose>
<if type="post-weblog">
<text value="(blog)"/>
</if>
</choose>
</group>
</else-if>
</choose>
</macro>
<macro name="publisher">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="date">
<choose>
<if variable="issued">
<group delimiter=" ">
<date variable="original-date" form="text" date-parts="year" prefix="(" suffix=")"/>
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</if>
<else-if variable="status">
<text variable="status" text-case="capitalize-first"/>
</else-if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<macro name="date-in-text">
<choose>
<if variable="issued">
<group delimiter=" ">
<date variable="original-date" form="text" date-parts="year" prefix="[" suffix="]"/>
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</if>
<else-if variable="status">
<text variable="status"/>
</else-if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<macro name="day-month">
<date variable="issued">
<date-part name="month"/>
<date-part name="day" prefix=" "/>
</date>
</macro>
<macro name="collection-title">
<choose>
<if match="none" type="article-journal">
<choose>
<if match="none" is-numeric="collection-number">
<group delimiter=", ">
<text variable="collection-title" text-case="title"/>
<text variable="collection-number"/>
</group>
</if>
<else>
<group delimiter=" ">
<text variable="collection-title" text-case="title"/>
<text variable="collection-number"/>
</group>
</else>
</choose>
</if>
</choose>
</macro>
<macro name="collection-title-journal">
<choose>
<if type="article-journal">
<group delimiter=" ">
<text variable="collection-title"/>
<text variable="collection-number"/>
</group>
</if>
</choose>
</macro>
<macro name="event">
<group delimiter=" ">
<choose>
<if variable="genre">
<text term="presented at"/>
</if>
<else>
<text term="presented at" text-case="capitalize-first"/>
</else>
</choose>
<text variable="event"/>
</group>
</macro>
<macro name="description">
<choose>
<if variable="interviewer" type="interview" match="any">
<group delimiter=". ">
<text macro="interviewer"/>
<text variable="medium" text-case="capitalize-first"/>
</group>
</if>
<else-if type="patent">
<group delimiter=" " prefix=". ">
<text variable="authority"/>
<text variable="number"/>
</group>
</else-if>
<else>
<text variable="medium" text-case="capitalize-first" prefix=". "/>
</else>
</choose>
<choose>
<if variable="title" match="none"/>
<else-if type="thesis personal_communication speech" match="any"/>
<else>
<group delimiter=" " prefix=". ">
<text variable="genre" text-case="capitalize-first"/>
<choose>
<if type="report">
<text variable="number"/>
</if>
</choose>
</group>
</else>
</choose>
</macro>
<macro name="issue">
<choose>
<if type="legal_case">
<text variable="authority" prefix=". "/>
</if>
<else-if type="speech">
<group prefix=". " delimiter=", ">
<group delimiter=" ">
<text variable="genre" text-case="capitalize-first"/>
<text macro="event"/>
</group>
<text variable="event-place"/>
<text macro="day-month"/>
</group>
</else-if>
<else-if type="article-newspaper article-magazine personal_communication" match="any">
<date variable="issued" form="text" prefix=", "/>
</else-if>
<else-if type="patent">
<group delimiter=", " prefix=", ">
<group delimiter=" ">
<!--Needs Localization-->
<text value="filed"/>
<date variable="submitted" form="text"/>
</group>
<group delimiter=" ">
<choose>
<if variable="issued submitted" match="all">
<text term="and"/>
</if>
</choose>
<!--Needs Localization-->
<text value="issued"/>
<date variable="issued" form="text"/>
</group>
</group>
</else-if>
<else-if type="article-journal" match="any"/>
<else>
<group prefix=". " delimiter=", ">
<choose>
<if type="thesis">
<text variable="genre" text-case="capitalize-first"/>
</if>
</choose>
<text macro="publisher"/>
</group>
</else>
</choose>
</macro>
<citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name" collapse="year" after-collapse-delimiter="; ">
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=", ">
<choose>
<if variable="issued accessed" match="any">
<group delimiter=" ">
<text macro="contributors-short"/>
<text macro="date-in-text"/>
</group>
</if>
<!---comma before forthcoming and n.d.-->
<else>
<group delimiter=", ">
<text macro="contributors-short"/>
<text macro="date-in-text"/>
</group>
</else>
</choose>
<text macro="point-locators"/>
</group>
</layout>
</citation>
<bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
<sort>
<key macro="contributors"/>
<key variable="issued"/>
<key variable="title"/>
</sort>
<layout suffix=".">
<group delimiter=". ">
<text macro="contributors"/>
<text macro="date"/>
<text macro="title"/>
</group>
<text macro="description"/>
<text macro="secondary-contributors" prefix=". "/>
<text macro="container-title" prefix=". "/>
<text macro="container-contributors"/>
<text macro="edition"/>
<text macro="locators-chapter"/>
<text macro="collection-title-journal" prefix=", " suffix=", "/>
<text macro="locators"/>
<text macro="collection-title" prefix=". "/>
<text macro="issue"/>
<text macro="locators-article"/>
<text macro="access" prefix=". "/>
</layout>
</bibliography>
</style>

View File

@ -0,0 +1,357 @@
<?xml version="1.0" encoding="utf-8"?>
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US">
<info>
<translator>
<name>Andrew Dunning</name>
</translator>
<translator>
<name>Sebastian Karcher</name>
</translator>
<translator>
<name>Rintze M. Zelle</name>
</translator>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
<updated>2015-10-10T23:31:02+00:00</updated>
</info>
<style-options punctuation-in-quote="true"/>
<date form="text">
<date-part name="month" suffix=" "/>
<date-part name="day" suffix=", "/>
<date-part name="year"/>
</date>
<date form="numeric">
<date-part name="month" form="numeric-leading-zeros" suffix="/"/>
<date-part name="day" form="numeric-leading-zeros" suffix="/"/>
<date-part name="year"/>
</date>
<terms>
<term name="accessed">accessed</term>
<term name="and">and</term>
<term name="and others">and others</term>
<term name="anonymous">anonymous</term>
<term name="anonymous" form="short">anon.</term>
<term name="at">at</term>
<term name="available at">available at</term>
<term name="by">by</term>
<term name="circa">circa</term>
<term name="circa" form="short">c.</term>
<term name="cited">cited</term>
<term name="edition">
<single>edition</single>
<multiple>editions</multiple>
</term>
<term name="edition" form="short">ed.</term>
<term name="et-al">et al.</term>
<term name="forthcoming">forthcoming</term>
<term name="from">from</term>
<term name="ibid">ibid.</term>
<term name="in">in</term>
<term name="in press">in press</term>
<term name="internet">internet</term>
<term name="interview">interview</term>
<term name="letter">letter</term>
<term name="no date">no date</term>
<term name="no date" form="short">n.d.</term>
<term name="online">online</term>
<term name="presented at">presented at the</term>
<term name="reference">
<single>reference</single>
<multiple>references</multiple>
</term>
<term name="reference" form="short">
<single>ref.</single>
<multiple>refs.</multiple>
</term>
<term name="retrieved">retrieved</term>
<term name="scale">scale</term>
<term name="version">version</term>
<!-- ANNO DOMINI; BEFORE CHRIST -->
<term name="ad">AD</term>
<term name="bc">BC</term>
<!-- PUNCTUATION -->
<term name="open-quote"></term>
<term name="close-quote"></term>
<term name="open-inner-quote"></term>
<term name="close-inner-quote"></term>
<term name="page-range-delimiter"></term>
<!-- ORDINALS -->
<term name="ordinal">th</term>
<term name="ordinal-01">st</term>
<term name="ordinal-02">nd</term>
<term name="ordinal-03">rd</term>
<term name="ordinal-11">th</term>
<term name="ordinal-12">th</term>
<term name="ordinal-13">th</term>
<!-- LONG ORDINALS -->
<term name="long-ordinal-01">first</term>
<term name="long-ordinal-02">second</term>
<term name="long-ordinal-03">third</term>
<term name="long-ordinal-04">fourth</term>
<term name="long-ordinal-05">fifth</term>
<term name="long-ordinal-06">sixth</term>
<term name="long-ordinal-07">seventh</term>
<term name="long-ordinal-08">eighth</term>
<term name="long-ordinal-09">ninth</term>
<term name="long-ordinal-10">tenth</term>
<!-- LONG LOCATOR FORMS -->
<term name="book">
<single>book</single>
<multiple>books</multiple>
</term>
<term name="chapter">
<single>chapter</single>
<multiple>chapters</multiple>
</term>
<term name="column">
<single>column</single>
<multiple>columns</multiple>
</term>
<term name="figure">
<single>figure</single>
<multiple>figures</multiple>
</term>
<term name="folio">
<single>folio</single>
<multiple>folios</multiple>
</term>
<term name="issue">
<single>number</single>
<multiple>numbers</multiple>
</term>
<term name="line">
<single>line</single>
<multiple>lines</multiple>
</term>
<term name="note">
<single>note</single>
<multiple>notes</multiple>
</term>
<term name="opus">
<single>opus</single>
<multiple>opera</multiple>
</term>
<term name="page">
<single>page</single>
<multiple>pages</multiple>
</term>
<term name="number-of-pages">
<single>page</single>
<multiple>pages</multiple>
</term>
<term name="paragraph">
<single>paragraph</single>
<multiple>paragraphs</multiple>
</term>
<term name="part">
<single>part</single>
<multiple>parts</multiple>
</term>
<term name="section">
<single>section</single>
<multiple>sections</multiple>
</term>
<term name="sub verbo">
<single>sub verbo</single>
<multiple>sub verbis</multiple>
</term>
<term name="verse">
<single>verse</single>
<multiple>verses</multiple>
</term>
<term name="volume">
<single>volume</single>
<multiple>volumes</multiple>
</term>
<!-- SHORT LOCATOR FORMS -->
<term name="book" form="short">
<single>bk.</single>
<multiple>bks.</multiple>
</term>
<term name="chapter" form="short">
<single>chap.</single>
<multiple>chaps.</multiple>
</term>
<term name="column" form="short">
<single>col.</single>
<multiple>cols.</multiple>
</term>
<term name="figure" form="short">
<single>fig.</single>
<multiple>figs.</multiple>
</term>
<term name="folio" form="short">
<single>fol.</single>
<multiple>fols.</multiple>
</term>
<term name="issue" form="short">
<single>no.</single>
<multiple>nos.</multiple>
</term>
<term name="line" form="short">
<single>l.</single>
<multiple>ll.</multiple>
</term>
<term name="note" form="short">
<single>n.</single>
<multiple>nn.</multiple>
</term>
<term name="opus" form="short">
<single>op.</single>
<multiple>opp.</multiple>
</term>
<term name="page" form="short">
<single>p.</single>
<multiple>pp.</multiple>
</term>
<term name="number-of-pages" form="short">
<single>p.</single>
<multiple>pp.</multiple>
</term>
<term name="paragraph" form="short">
<single>para.</single>
<multiple>paras.</multiple>
</term>
<term name="part" form="short">
<single>pt.</single>
<multiple>pts.</multiple>
</term>
<term name="section" form="short">
<single>sec.</single>
<multiple>secs.</multiple>
</term>
<term name="sub verbo" form="short">
<single>s.v.</single>
<multiple>s.vv.</multiple>
</term>
<term name="verse" form="short">
<single>v.</single>
<multiple>vv.</multiple>
</term>
<term name="volume" form="short">
<single>vol.</single>
<multiple>vols.</multiple>
</term>
<!-- SYMBOL LOCATOR FORMS -->
<term name="paragraph" form="symbol">
<single></single>
<multiple>¶¶</multiple>
</term>
<term name="section" form="symbol">
<single>§</single>
<multiple>§§</multiple>
</term>
<!-- LONG ROLE FORMS -->
<term name="director">
<single>director</single>
<multiple>directors</multiple>
</term>
<term name="editor">
<single>editor</single>
<multiple>editors</multiple>
</term>
<term name="editorial-director">
<single>editor</single>
<multiple>editors</multiple>
</term>
<term name="illustrator">
<single>illustrator</single>
<multiple>illustrators</multiple>
</term>
<term name="translator">
<single>translator</single>
<multiple>translators</multiple>
</term>
<term name="editortranslator">
<single>editor &amp; translator</single>
<multiple>editors &amp; translators</multiple>
</term>
<!-- SHORT ROLE FORMS -->
<term name="director" form="short">
<single>dir.</single>
<multiple>dirs.</multiple>
</term>
<term name="editor" form="short">
<single>ed.</single>
<multiple>eds.</multiple>
</term>
<term name="editorial-director" form="short">
<single>ed.</single>
<multiple>eds.</multiple>
</term>
<term name="illustrator" form="short">
<single>ill.</single>
<multiple>ills.</multiple>
</term>
<term name="translator" form="short">
<single>tran.</single>
<multiple>trans.</multiple>
</term>
<term name="editortranslator" form="short">
<single>ed. &amp; tran.</single>
<multiple>eds. &amp; trans.</multiple>
</term>
<!-- VERB ROLE FORMS -->
<term name="container-author" form="verb">by</term>
<term name="director" form="verb">directed by</term>
<term name="editor" form="verb">edited by</term>
<term name="editorial-director" form="verb">edited by</term>
<term name="illustrator" form="verb">illustrated by</term>
<term name="interviewer" form="verb">interview by</term>
<term name="recipient" form="verb">to</term>
<term name="reviewed-author" form="verb">by</term>
<term name="translator" form="verb">translated by</term>
<term name="editortranslator" form="verb">edited &amp; translated by</term>
<!-- SHORT VERB ROLE FORMS -->
<term name="director" form="verb-short">dir. by</term>
<term name="editor" form="verb-short">ed. by</term>
<term name="editorial-director" form="verb-short">ed. by</term>
<term name="illustrator" form="verb-short">illus. by</term>
<term name="translator" form="verb-short">trans. by</term>
<term name="editortranslator" form="verb-short">ed. &amp; trans. by</term>
<!-- LONG MONTH FORMS -->
<term name="month-01">January</term>
<term name="month-02">February</term>
<term name="month-03">March</term>
<term name="month-04">April</term>
<term name="month-05">May</term>
<term name="month-06">June</term>
<term name="month-07">July</term>
<term name="month-08">August</term>
<term name="month-09">September</term>
<term name="month-10">October</term>
<term name="month-11">November</term>
<term name="month-12">December</term>
<!-- SHORT MONTH FORMS -->
<term name="month-01" form="short">Jan.</term>
<term name="month-02" form="short">Feb.</term>
<term name="month-03" form="short">Mar.</term>
<term name="month-04" form="short">Apr.</term>
<term name="month-05" form="short">May</term>
<term name="month-06" form="short">Jun.</term>
<term name="month-07" form="short">Jul.</term>
<term name="month-08" form="short">Aug.</term>
<term name="month-09" form="short">Sep.</term>
<term name="month-10" form="short">Oct.</term>
<term name="month-11" form="short">Nov.</term>
<term name="month-12" form="short">Dec.</term>
<!-- SEASONS -->
<term name="season-01">Spring</term>
<term name="season-02">Summer</term>
<term name="season-03">Autumn</term>
<term name="season-04">Winter</term>
</terms>
</locale>

View File

@ -3,6 +3,7 @@
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
;; Author: Drew Adams <drew.adams@oracle.com>
;; Maintainer: emacs-devel@gnu.org
;; This file is part of GNU Emacs.

View File

@ -80,9 +80,6 @@ char *w32_getenv (const char *);
#include <sys/stat.h>
#include <unistd.h>
#ifndef WINDOWSNT
# include <acl.h>
#endif
#include <filename.h>
#include <intprops.h>
#include <min-max.h>
@ -94,10 +91,6 @@ char *w32_getenv (const char *);
# pragma GCC diagnostic ignored "-Wformat-truncation=2"
#endif
#if !defined O_PATH && !defined WINDOWSNT
# define O_PATH O_SEARCH
#endif
/* Name used to invoke this program. */
static char const *progname;
@ -1135,6 +1128,12 @@ process_grouping (void)
#ifdef SOCKETS_IN_FILE_SYSTEM
# include <acl.h>
# ifndef O_PATH
# define O_PATH O_SEARCH
# endif
/* A local socket address. The union avoids the need to cast. */
union local_sockaddr
{

View File

@ -91,8 +91,19 @@ COMPILE_FIRST = \
$(lisp)/emacs-lisp/byte-opt.elc \
$(lisp)/emacs-lisp/bytecomp.elc
ifeq ($(HAVE_NATIVE_COMP),yes)
COMPILE_FIRST += $(lisp)/emacs-lisp/comp.elc
COMPILE_FIRST += $(lisp)/emacs-lisp/comp-cstr.elc
COMPILE_FIRST += \
$(lisp)/emacs-lisp/comp.elc \
$(lisp)/emacs-lisp/comp-cstr.elc \
$(lisp)/emacs-lisp/cl-macs.elc \
$(lisp)/emacs-lisp/rx.elc \
$(lisp)/emacs-lisp/cl-seq.elc \
$(lisp)/help-mode.elc \
$(lisp)/emacs-lisp/cl-extra.elc \
$(lisp)/emacs-lisp/gv.elc \
$(lisp)/emacs-lisp/seq.elc \
$(lisp)/emacs-lisp/cl-lib.elc \
$(lisp)/emacs-lisp/warnings.elc \
$(lisp)/emacs-lisp/subr-x.elc
endif
COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc

View File

@ -3087,6 +3087,14 @@ To see the documentation for a defined struct type, use
;; and pred-check, so changing it is not straightforward.
(push `(,defsym ,accessor (cl-x)
,(concat
;; NB. This will produce incorrect results
;; in some cases, as our coding conventions
;; says that the first line must be a full
;; sentence. However, if we don't word wrap
;; we will have byte-compiler warnings about
;; overly long docstrings. So we can't have
;; a perfect result here, and choose to avoid
;; the byte-compiler warnings.
(internal--format-docstring-line
"Access slot \"%s\" of `%s' struct CL-X." slot name)
(if doc (concat "\n" doc) ""))

View File

@ -93,7 +93,7 @@ Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate `%S'.
evaluate `%s'.
The mode's hook is called both when the mode is enabled and when
it is disabled.")
@ -109,7 +109,9 @@ it is disabled.")
(docs-fc (bound-and-true-p emacs-lisp-docstring-fill-column))
(fill-column (if (integerp docs-fc) docs-fc 65))
(argdoc (format easy-mmode--arg-docstring mode-pretty-name
getter))
;; Avoid having quotes turn into pretty quotes.
(string-replace "'" "\\\\='"
(format "%S" getter))))
(filled (if (fboundp 'fill-region)
(with-temp-buffer
(insert argdoc)

View File

@ -188,10 +188,12 @@ parameters and authentication."
It is not strictly necessary to provide this, since ERC will
prompt you for it.")
(defcustom erc-user-mode nil
(defcustom erc-user-mode "+i"
;; +i "Invisible". Hides user from global /who and /names.
"Initial user modes to be set after a connection is established."
:group 'erc
:type '(choice (const nil) string function))
:type '(choice (const nil) string function)
:version "28.1")
(defcustom erc-prompt-for-password t

View File

@ -3897,7 +3897,7 @@ inhibited."
(hack-local-variables-apply))))))
(defun hack-local-variables--find-variables (&optional handle-mode)
"Return all local variables in the ucrrent buffer.
"Return all local variables in the current buffer.
If HANDLE-MODE is nil, we gather all the specified local
variables. If HANDLE-MODE is neither nil nor t, we do the same,
except that any settings of `mode' are ignored.

View File

@ -3553,32 +3553,13 @@ articles in every agentized group? "))
(when (and to-remove
(or gnus-expert-user
(gnus-y-or-n-p
"gnus-agent-expire has identified local directories that are\
not currently required by any agentized group. Do you wish to consider\
deleting them?")))
(while to-remove
(let ((dir (pop to-remove)))
(if (or gnus-expert-user
"gnus-agent-expire has identified local directories that are
not currently required by any agentized group. Do you wish to consider
deleting them?")))
(dolist (dir to-remove)
(when (or gnus-expert-user
(gnus-y-or-n-p (format "Delete %s? " dir)))
(let* (delete-recursive
files f
(delete-recursive
(lambda (f-or-d)
(ignore-errors
(if (file-directory-p f-or-d)
(condition-case nil
(delete-directory f-or-d)
(file-error
(setq files (directory-files f-or-d))
(while files
(setq f (pop files))
(or (member f '("." ".."))
(funcall delete-recursive
(nnheader-concat
f-or-d f))))
(delete-directory f-or-d)))
(delete-file f-or-d))))))
(funcall delete-recursive dir)))))))))
(delete-directory dir t)))))))
;;;###autoload
(defun gnus-agent-batch ()

View File

@ -157,7 +157,9 @@
(armenian #x531)
(hebrew #x5D0)
(vai #xA500)
(arabic #x628)
;; U+06C1 prevents us from using bad fonts, like DejaVu Sans,
;; for Arabic text.
(arabic #x628 #x6C1)
(syriac #x710)
(thaana #x78C)
(devanagari #x915)

View File

@ -294,30 +294,8 @@ attribute."
(apply 'define-charset-internal name (mapcar 'cdr attrs))))
(defun hack-elisp-shorthands (fullname)
"Return value of the `elisp-shorthands' file-local variable in FULLNAME.
FULLNAME is the absolute file name of an Elisp .el file which
potentially specifies a file-local value for `elisp-shorthands'.
The Elisp code in FULLNAME isn't read or evaluated in any way, except
for extraction of the buffer-local value of `elisp-shorthands'."
(let ((size (nth 7 (file-attributes fullname))))
(with-temp-buffer
(insert-file-contents fullname nil (max 0 (- size 3000)) size)
(goto-char (point-max))
(let* ((found (search-backward-regexp "elisp-shorthands:[ \t]*" 0 t))
(val (and found
(goto-char (match-end 0))
(ignore-errors (read (current-buffer)))))
(probe val)
aux)
(catch 'done
(when (consp probe)
(while (setq aux (pop probe))
(unless (and (consp aux)
(stringp (car aux))
(stringp (cdr aux)))
(throw 'done nil)))
val))))))
(defvar hack-read-symbol-shorthands-function nil
"Holds function to compute `read-symbol-shorthands'.")
(defun load-with-code-conversion (fullname file &optional noerror nomessage)
"Execute a file of Lisp code named FILE whose absolute name is FULLNAME.
@ -344,7 +322,8 @@ Return t if file exists."
(let ((load-true-file-name fullname)
(load-file-name fullname)
(set-auto-coding-for-load t)
(inhibit-file-name-operation nil))
(inhibit-file-name-operation nil)
shorthands)
(with-current-buffer buffer
;; So that we don't get completely screwed if the
;; file is encoded in some complicated character set,
@ -353,6 +332,13 @@ Return t if file exists."
;; Don't let deactivate-mark remain set.
(let (deactivate-mark)
(insert-file-contents fullname))
(setq shorthands
;; We need this indirection because hacking local
;; variables in too early seems to have cause
;; recursive load loops (bug#50946). Thus it
;; remains nil until it is save to do so.
(and hack-read-symbol-shorthands-function
(funcall hack-read-symbol-shorthands-function)))
;; If the loaded file was inserted with no-conversion or
;; raw-text coding system, make the buffer unibyte.
;; Otherwise, eval-buffer might try to interpret random
@ -363,11 +349,13 @@ Return t if file exists."
(set-buffer-multibyte nil))
;; Make `kill-buffer' quiet.
(set-buffer-modified-p nil))
;; Have the original buffer current while we eval.
(eval-buffer buffer nil
;; This is compatible with what `load' does.
(if dump-mode file fullname)
nil t))
;; Have the original buffer current while we eval,
;; but consider shorthands of the eval'ed one.
(let ((read-symbol-shorthands shorthands))
(eval-buffer buffer nil
;; This is compatible with what `load' does.
(if dump-mode file fullname)
nil t)))
(let (kill-buffer-hook kill-buffer-query-functions)
(kill-buffer buffer)))
(do-after-load-evaluation fullname)
@ -378,13 +366,6 @@ Return t if file exists."
(message "Loading %s...done" file)))
t)))
(defun load-with-shorthands-and-code-conversion (fullname file noerror nomessage)
"Like `load-with-code-conversion', but also consider Elisp shorthands.
This function uses shorthands defined in the file FULLNAME's local
value of `elisp-shorthands', when it processes that file's Elisp code."
(let ((elisp-shorthands (hack-elisp-shorthands fullname)))
(load-with-code-conversion fullname file noerror nomessage)))
(defun charset-info (charset)
"Return a vector of information of CHARSET.
This function is provided for backward compatibility.

View File

@ -151,7 +151,7 @@
;; variable its advertised default value (it starts as nil, see
;; xdisp.c).
(setq resize-mini-windows 'grow-only)
(setq load-source-file-function #'load-with-shorthands-and-code-conversion)
(setq load-source-file-function #'load-with-code-conversion)
(load "files")
;; Load-time macro-expansion can only take effect after setting
@ -352,6 +352,10 @@
(load "vc/ediff-hook")
(load "uniquify")
(load "electric")
(load "paren")
(load "shorthands")
(load "emacs-lisp/eldoc")
(load "cus-start") ;Late to reduce customize-rogue (needs loaddefs.el anyway)
(if (not (eq system-type 'ms-dos))

View File

@ -290,6 +290,7 @@ and should return the same menu with changes such as added new menu items."
:type '(repeat
(choice (function-item context-menu-undo)
(function-item context-menu-region)
(function-item context-menu-middle-separator)
(function-item context-menu-toolbar)
(function-item context-menu-global)
(function-item context-menu-local)
@ -478,14 +479,6 @@ Some context functions add menu items below the separator."
`(menu-item "All"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'buffer))
:help "Mark the whole buffer for a subsequent cut/copy"))
(define-key-after submenu [mark-defun]
`(menu-item "Defun"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun))
:help "Mark the defun at click for a subsequent cut/copy"))
(define-key-after submenu [mark-list]
`(menu-item "List"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list))
:help "Mark the list at click for a subsequent cut/copy"))
(when (let* ((pos (posn-point (event-end click)))
(char (when pos (char-after pos))))
(or (and char (eq (char-syntax char) ?\"))
@ -498,10 +491,6 @@ Some context functions add menu items below the separator."
`(menu-item "Line"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'line))
:help "Mark the line at click for a subsequent cut/copy"))
(define-key-after submenu [mark-symbol]
`(menu-item "Symbol"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'symbol))
:help "Mark the symbol at click for a subsequent cut/copy"))
(when (region-active-p)
(define-key-after submenu [mark-none]
`(menu-item "None"

View File

@ -1382,10 +1382,12 @@ When you add this function to `context-menu-functions',
the context menu will contain an item that searches
the word at mouse click."
(when (thing-at-mouse click 'word)
(define-key menu [dictionary-separator] menu-bar-separator)
(define-key menu [dictionary-search-word-at-mouse]
(define-key-after menu [dictionary-separator] menu-bar-separator
'middle-separator)
(define-key-after menu [dictionary-search-word-at-mouse]
'(menu-item "Dictionary Search" dictionary-search-word-at-mouse
:help "Search the word at mouse click in dictionary")))
:help "Search the word at mouse click in dictionary")
'dictionary-separator))
menu)
(provide 'dictionary)

View File

@ -319,12 +319,7 @@ KEY identifies the connection, it is either a process or a
used to cache connection properties of the local machine.
If KEY is `tramp-cache-undefined', or if the value is not set for
the connection, return DEFAULT."
;; Unify key by removing localname and hop from `tramp-file-name'
;; structure. Work with a copy in order to avoid side effects.
(when (tramp-file-name-p key)
(setq key (copy-tramp-file-name key))
(setf (tramp-file-name-localname key) nil
(tramp-file-name-hop key) nil))
(setq key (tramp-file-name-unify key))
(let* ((hash (tramp-get-hash-table key))
(cached (if (hash-table-p hash)
(gethash property hash tramp-cache-undefined)
@ -350,12 +345,7 @@ used to cache connection properties of the local machine. If KEY
is `tramp-cache-undefined', nothing is set.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure.
Return VALUE."
;; Unify key by removing localname and hop from `tramp-file-name'
;; structure. Work with a copy in order to avoid side effects.
(when (tramp-file-name-p key)
(setq key (copy-tramp-file-name key))
(setf (tramp-file-name-localname key) nil
(tramp-file-name-hop key) nil))
(setq key (tramp-file-name-unify key))
(when-let ((hash (tramp-get-hash-table key)))
(puthash property value hash))
(setq tramp-cache-data-changed
@ -379,12 +369,7 @@ KEY identifies the connection, it is either a process or a
`tramp-file-name' structure. A special case is nil, which is
used to cache connection properties of the local machine.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure."
;; Unify key by removing localname and hop from `tramp-file-name'
;; structure. Work with a copy in order to avoid side effects.
(when (tramp-file-name-p key)
(setq key (copy-tramp-file-name key))
(setf (tramp-file-name-localname key) nil
(tramp-file-name-hop key) nil))
(setq key (tramp-file-name-unify key))
(when-let ((hash (tramp-get-hash-table key)))
(remhash property hash))
(setq tramp-cache-data-changed
@ -397,12 +382,7 @@ PROPERTY is set persistent when KEY is a `tramp-file-name' structure."
KEY identifies the connection, it is either a process or a
`tramp-file-name' structure. A special case is nil, which is
used to cache connection properties of the local machine."
;; Unify key by removing localname and hop from `tramp-file-name'
;; structure. Work with a copy in order to avoid side effects.
(when (tramp-file-name-p key)
(setq key (copy-tramp-file-name key))
(setf (tramp-file-name-localname key) nil
(tramp-file-name-hop key) nil))
(setq key (tramp-file-name-unify key))
(tramp-message
key 7 "%s %s" key
(when-let ((hash (gethash key tramp-cache-data)))

View File

@ -175,15 +175,30 @@
mount)
(match-string 1 mount)))))))
(defun tramp-fuse-get-fusermount ()
"Determine the local `fusermount' command."
;; We use key nil for local connection properties.
(with-tramp-connection-property nil "fusermount"
(or (executable-find "fusermount3")
(executable-find "fusermount"))))
(defvar tramp-fuse-mount-points nil
"List of fuse volume determined by a VEC.")
(defun tramp-fuse-unmount (vec)
"Unmount fuse volume determined by VEC."
(let ((default-directory tramp-compat-temporary-file-directory)
(command (format "fusermount3 -u %s" (tramp-fuse-mount-point vec))))
(let* ((default-directory tramp-compat-temporary-file-directory)
(mount-point (tramp-fuse-mount-point vec))
(command (format "%s -u %s" (tramp-fuse-get-fusermount) mount-point)))
(tramp-message vec 6 "%s\n%s" command (shell-command-to-string command))
(tramp-flush-connection-property
(tramp-get-connection-process vec) "mounted")
(setq tramp-fuse-mount-points
(delete (tramp-file-name-unify vec) tramp-fuse-mount-points))
;; Give the caches a chance to expire.
(sleep-for 1)))
(sleep-for 1)
(when (tramp-compat-directory-empty-p mount-point)
(delete-directory mount-point))))
(defun tramp-fuse-local-file-name (filename)
"Return local mount name of FILENAME."
@ -205,6 +220,36 @@
(substring localname 1) localname)
(tramp-fuse-mount-point v)))))))
(defcustom tramp-fuse-unmount-on-cleanup nil
"Whether fuse volumes shall be unmounted on cleanup."
:group 'tramp
:version "28.1"
:type 'boolean)
(defun tramp-fuse-cleanup (vec)
"Cleanup fuse volume determined by VEC."
(and tramp-fuse-unmount-on-cleanup
(member (tramp-file-name-unify vec) tramp-fuse-mount-points)
(tramp-fuse-unmount vec)))
(defun tramp-fuse-cleanup-all ()
"Unmount all fuse volumes used by Tramp."
(and tramp-fuse-unmount-on-cleanup
(mapc #'tramp-fuse-unmount tramp-fuse-mount-points)))
;; Add cleanup hooks.
(add-hook 'tramp-cleanup-connection-hook #'tramp-fuse-cleanup)
(add-hook 'tramp-cleanup-all-connections-hook #'tramp-fuse-cleanup-all)
(add-hook 'kill-emacs-hook #'tramp-fuse-cleanup-all)
(add-hook 'tramp-fuse-unload-hook
(lambda ()
(remove-hook 'tramp-cleanup-connection-hook
#'tramp-fuse-cleanup)
(remove-hook 'tramp-cleanup-all-connections-hook
#'tramp-fuse-cleanup-all)
(remove-hook 'kill-emacs-hook
#'tramp-fuse-cleanup-all)))
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-fuse 'force)))

View File

@ -386,6 +386,7 @@ connection if a previous connection has died for some reason."
(tramp-cleanup-connection vec 'keep-debug 'keep-password))
;; Mark it as connected.
(add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t))))

View File

@ -222,11 +222,14 @@ arguments to pass to the OPERATION."
(defun tramp-sshfs-handle-insert-file-contents
(filename &optional visit beg end replace)
"Like `insert-file-contents' for Tramp files."
(let ((result
(insert-file-contents
(tramp-fuse-local-file-name filename) visit beg end replace)))
(when visit (setq buffer-file-name filename))
(cons (expand-file-name filename) (cdr result))))
(setq filename (expand-file-name filename))
(let (signal-hook-function result)
(unwind-protect
(setq result
(insert-file-contents
(tramp-fuse-local-file-name filename) visit beg end replace))
(when visit (setq buffer-file-name filename))
(cons filename (cdr result)))))
(defun tramp-sshfs-handle-process-file
(program &optional infile destination display &rest args)
@ -368,6 +371,7 @@ connection if a previous connection has died for some reason."
vec 'file-error "Error mounting %s" (tramp-fuse-mount-spec vec))))
;; Mark it as connected.
(add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t)))

View File

@ -1450,16 +1450,24 @@ If nil, return `tramp-default-port'."
(put #'tramp-file-name-port-or-default 'tramp-suppress-trace t)
(defun tramp-file-name-unify (vec)
"Unify VEC by removing localname and hop from `tramp-file-name' structure.
Objects returned by this function compare `equal' if they refer to the
same connection. Make a copy in order to avoid side effects."
(when (tramp-file-name-p vec)
(setq vec (copy-tramp-file-name vec))
(setf (tramp-file-name-localname vec) nil
(tramp-file-name-hop vec) nil))
vec)
(put #'tramp-file-name-unify 'tramp-suppress-trace t)
;; Comparison of file names is performed by `tramp-equal-remote'.
(defun tramp-file-name-equal-p (vec1 vec2)
"Check, whether VEC1 and VEC2 denote the same `tramp-file-name'."
(and (tramp-file-name-p vec1) (tramp-file-name-p vec2)
(string-equal (tramp-file-name-method vec1)
(tramp-file-name-method vec2))
(string-equal (tramp-file-name-user-domain vec1)
(tramp-file-name-user-domain vec2))
(string-equal (tramp-file-name-host-port vec1)
(tramp-file-name-host-port vec2))))
(equal (tramp-file-name-unify vec1)
(tramp-file-name-unify vec2))))
(defun tramp-get-method-parameter (vec param)
"Return the method parameter PARAM.
@ -3743,7 +3751,8 @@ User is always nil."
(with-parsed-tramp-file-name filename nil
(unwind-protect
(if (not (file-exists-p filename))
(tramp-compat-file-missing v filename)
(let ((tramp-verbose (if visit 0 tramp-verbose)))
(tramp-compat-file-missing v filename))
(with-tramp-progress-reporter
v 3 (format-message "Inserting `%s'" filename)
@ -3845,7 +3854,7 @@ User is always nil."
(delete-file (tramp-make-tramp-file-name v remote-copy 'nohop))))
;; Result.
(cons (expand-file-name filename) (cdr result)))))
(cons filename (cdr result)))))
(defun tramp-get-lock-file (file)
"Read lockfile info of FILE.
@ -3920,7 +3929,8 @@ Return nil when there is no lockfile."
(tramp-error v 'file-error "Unsafe lock file name")))
;; Do the lock.
(let (create-lockfiles signal-hook-function)
(let ((tramp-verbose 0)
create-lockfiles signal-hook-function)
(condition-case nil
(make-symbolic-link info lockname 'ok-if-already-exists)
(error

View File

@ -290,7 +290,7 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE."
(orgtbl-to-generic
table
(org-combine-plists
'(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field)
'(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field :raw t :backend ascii)
params)))))
data-file)

View File

@ -6,20 +6,20 @@
;; Keywords: literate programming, reproducible research, scientific computing
;; Homepage: https://github.com/phrb/ob-julia
;; This file is not part of GNU Emacs.
;; This file is part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -90,18 +90,13 @@ This function is called by `org-babel-execute-src-block'."
(graphics-file (and (member "graphics" (assq :result-params params))
(org-babel-graphical-output-file params)))
(colnames-p (unless graphics-file (cdr (assq :colnames params))))
;; (rownames-p (unless graphics-file (cdr (assq :rownames params))))
(full-body (org-babel-expand-body:julia body params graphics-file))
(result
(org-babel-julia-evaluate
session full-body result-type result-params
(or (equal "yes" colnames-p)
(org-babel-pick-name
(cdr (assq :colname-names params)) colnames-p))
;; (or (equal "yes" rownames-p)
;; (org-babel-pick-name
;; (cdr (assq :rowname-names params)) rownames-p))
)))
(cdr (assq :colname-names params)) colnames-p)))))
(if graphics-file nil result))))
(defun org-babel-normalize-newline (result)
@ -135,12 +130,7 @@ This function is called by `org-babel-execute-src-block'."
"Return list of julia statements assigning the block's variables."
(let ((vars (org-babel--get-vars params)))
(mapcar
(lambda (pair)
(org-babel-julia-assign-elisp
(car pair) (cdr pair)
;; (equal "yes" (cdr (assq :colnames params)))
;; (equal "yes" (cdr (assq :rownames params)))
))
(lambda (pair) (org-babel-julia-assign-elisp (car pair) (cdr pair)))
(mapcar
(lambda (i)
(cons (car (nth i vars))
@ -156,7 +146,7 @@ This function is called by `org-babel-execute-src-block'."
(concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"") "\"")
(format "%S" s)))
(defun org-babel-julia-assign-elisp (name value) ;; colnames-p rownames-p
(defun org-babel-julia-assign-elisp (name value)
"Construct julia code assigning the elisp VALUE to a variable named NAME."
(if (listp value)
(let* ((lengths (mapcar #'length (cl-remove-if-not #'sequencep value)))
@ -164,11 +154,7 @@ This function is called by `org-babel-execute-src-block'."
(min (if lengths (apply #'min lengths) 0)))
;; Ensure VALUE has an orgtbl structure (depth of at least 2).
(unless (listp (car value)) (setq value (list value)))
(let ((file (orgtbl-to-csv value '(:fmt org-babel-julia-quote-csv-field)))
;; (header (if (or (eq (nth 1 value) 'hline) colnames-p)
;; "TRUE" "FALSE"))
;; (row-names (if rownames-p "1" "NULL"))
)
(let ((file (orgtbl-to-csv value '(:fmt org-babel-julia-quote-csv-field))))
(if (= max min)
(format "%s = begin
using CSV
@ -188,7 +174,7 @@ end"
(let ((session (or session "*Julia*"))
(ess-ask-for-ess-directory
(and (bound-and-true-p ess-ask-for-ess-directory)
(not (cdr (assq :dir params))))))
(not (cdr (assq :dir params))))))
(if (org-babel-comint-buffer-livep session)
session
;; FIXME: Depending on `display-buffer-alist', (julia) may end up
@ -209,14 +195,6 @@ end"
(buffer-name))))
(current-buffer))))))
; (defun org-babel-julia-associate-session (session)
; "Associate julia code buffer with a julia session.
; Make SESSION be the inferior ESS process associated with the
; current code buffer."
; (setq ess-local-process-name
; (process-name (get-buffer-process session)))
; (ess-make-buffer-current))
(defun org-babel-julia-graphical-output-file (params)
"Name of file to which julia should send graphical output."
(and (member "graphics" (cdr (assq :result-params params)))
@ -259,16 +237,16 @@ end"
end")
(defun org-babel-julia-evaluate
(session body result-type result-params column-names-p) ;; row-names-p
(session body result-type result-params column-names-p)
"Evaluate julia code in BODY."
(if session
(org-babel-julia-evaluate-session
session body result-type result-params column-names-p) ;; row-names-p
session body result-type result-params column-names-p)
(org-babel-julia-evaluate-external-process
body result-type result-params column-names-p))) ;; row-names-p
body result-type result-params column-names-p)))
(defun org-babel-julia-evaluate-external-process
(body result-type result-params column-names-p) ;; row-names-p
(body result-type result-params column-names-p)
"Evaluate BODY in external julia process.
If RESULT-TYPE equals 'output then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the
@ -292,7 +270,7 @@ last statement in BODY, as elisp."
(output (org-babel-eval org-babel-julia-command body))))
(defun org-babel-julia-evaluate-session
(session body result-type result-params column-names-p) ;; row-names-p
(session body result-type result-params column-names-p)
"Evaluate BODY in SESSION.
If RESULT-TYPE equals 'output then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the

View File

@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -87,42 +89,42 @@
:group 'org-cite
:package-version '(Org . "9.5")
:type 'symbol
:safe t)
:safe #'symbolp)
(defcustom org-cite-basic-author-year-separator ", "
"String used to separate cites in an author-year configuration."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-cite-basic-max-key-distance 2
"Maximum (Levenshtein) distance between a wrong key and its suggestions."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'integer
:safe t)
:safe #'integerp)
(defcustom org-cite-basic-author-column-end 25
"Column where author field ends in completion table, as an integer."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'integer
:safe t)
:safe #'integerp)
(defcustom org-cite-basic-column-separator " "
"Column separator in completion table, as a string."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-cite-basic-mouse-over-key-face 'highlight
"Face used when mouse is over a citation key."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'face
:safe t)
:safe #'facep)
;;; Internal variables

View File

@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -78,7 +80,7 @@ If \"biblatex\" package is already required in the document, e.g., through
:type '(choice
(string :tag "Options (key=value,key2=value2...)")
(const :tag "No option" nil))
:safe t)
:safe #'string-or-null-p)
;;; Internal functions

View File

@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -125,7 +127,9 @@ If nil then only the fallback en-US locale will be available."
:type '(choice
(directory :tag "Locales directory")
(const :tag "Use en-US locale only" nil))
:safe t)
;; It's not obvious to me that arbitrary locations are safe.
;;; :safe #'string-or-null-p
)
(defcustom org-cite-csl-styles-dir nil
"Directory of CSL style files.
@ -136,7 +140,9 @@ directory. This variable is ignored when style file is absolute."
:type '(choice
(directory :tag "Styles directory")
(const :tag "Use absolute file names" nil))
:safe t)
;; It's not obvious to me that arbitrary locations are safe.
;;; :safe #'string-or-null-p
)
;;;; Citelinks
(defcustom org-cite-csl-link-cites t
@ -144,7 +150,7 @@ directory. This variable is ignored when style file is absolute."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'boolean
:safe t)
:safe #'booleanp)
(defcustom org-cite-csl-no-citelinks-backends '(ascii)
"List of export back-ends for which cite linking is disabled.
@ -152,8 +158,7 @@ Cite linking for export back-ends derived from any of the back-ends listed here,
is also disabled."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(repeat symbol)
:safe t)
:type '(repeat symbol))
;;;; Output-specific variables
(defcustom org-cite-csl-html-hanging-indent "1.5em"
@ -161,7 +166,7 @@ is also disabled."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-cite-csl-html-label-width-per-char "0.6em"
"Character width in CSS units for calculating entry label widths.
@ -169,27 +174,33 @@ Used only when `second-field-align' is activated by the used CSL style."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-cite-csl-latex-hanging-indent "1.5em"
"Size of hanging-indent for LaTeX output in valid LaTeX units."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
;;; Internal variables
(defconst org-cite-csl--etc-dir
(let* ((oc-root (file-name-directory (locate-library "oc")))
(oc-etc-dir-1 (expand-file-name "../etc/csl/" oc-root)))
;; package.el and straight will put all of org-mode/lisp/ in org-mode/.
;; This will cause .. to resolve to the directory above Org.
;; To make life easier for people using package.el or straight, we can
;; check to see if ../etc/csl exists, and if it doesn't try ./etc/csl.
(if (file-exists-p oc-etc-dir-1) oc-etc-dir-1
(expand-file-name "etc/csl/" oc-root)))
"Directory \"etc/\" from repository.")
(let ((oc-root (file-name-directory (locate-library "oc"))))
(cond
;; First check whether it looks like we're running from the main
;; Org repository.
((let ((csl-org (expand-file-name "../etc/csl/" oc-root)))
(and (file-directory-p csl-org) csl-org)))
;; Next look for the directory alongside oc.el because package.el
;; and straight will put all of org-mode/lisp/ in org-mode/.
((let ((csl-pkg (expand-file-name "etc/csl/" oc-root)))
(and (file-directory-p csl-pkg) csl-pkg)))
;; Finally fall back the location used by shared system installs
;; and when running directly from Emacs repository.
(t
(expand-file-name "org/csl/" data-directory))))
"Directory containing CSL-related data files.")
(defconst org-cite-csl--fallback-locales-dir org-cite-csl--etc-dir
"Fallback CSL locale files directory.")

View File

@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -69,8 +71,7 @@ If \"natbib\" package is already required in the document, e.g., through
(const :tag "order as above, but numerical citations are compressed if possible" sort&compress)
(const :tag "display full author list on first citation, abbreviate the others" longnamesfirst)
(const :tag "redefine \\thebibliography to issue \\section* instead of \\chapter*" sectionbib)
(const :tag "keep all the authors' names in a citation on one line" nonamebreak))
:safe t)
(const :tag "keep all the authors' names in a citation on one line" nonamebreak)))
;;; Internal functions

View File

@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@ -125,16 +127,14 @@ File names must be absolute."
:package-version '(Org . "9.5")
:type '(choice (const :tag "No global bibliography" nil)
(repeat :tag "List of bibliography files"
(file :tag "Bibliography")))
:safe t)
(file :tag "Bibliography"))))
(defcustom org-cite-activate-processor 'basic
"Processor used for activating citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "Default fontification" nil)
(symbol :tag "Citation processor"))
:safe nil)
(symbol :tag "Citation processor")))
(defcustom org-cite-export-processors '((t basic))
"Processor used for exporting citations, as a triplet, or nil.
@ -198,24 +198,21 @@ back-end."
(string :tag "Use specific bibliography style"))
(choice
(const :tag "Default citation style" nil)
(string :tag "Use specific citation style")))))
:safe nil)
(string :tag "Use specific citation style"))))))
(defcustom org-cite-follow-processor 'basic
"Processor used for following citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "No following" nil)
(symbol :tag "Citation processor"))
:safe nil)
(symbol :tag "Citation processor")))
(defcustom org-cite-insert-processor 'basic
"Processor used for inserting citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "No insertion" nil)
(symbol :tag "Citation processor"))
:safe nil)
(symbol :tag "Citation processor")))
(defcustom org-cite-adjust-note-numbers t
"When non-nil, allow process to modify location of note numbers.
@ -232,7 +229,7 @@ When nil, the note number is not moved."
:package-version '(Org . "9.5")
:type '(choice (const :tag "Automatic note number location" t)
(const :tag "Place note numbers manually" nil))
:safe t)
:safe #'booleanp)
(defcustom org-cite-note-rules
'(("en-us" inside outside after)
@ -297,8 +294,7 @@ This roughly follows the Oxford Guide to Style recommendations."
(const :tag "Citation next to punctuation" same))
(choice :tag "Order of citation and punctuation"
(const :tag "Citation first" before)
(const :tag "Citation last" after))))
:safe t)
(const :tag "Citation last" after)))))
(defcustom org-cite-punctuation-marks '("." "," ";" ":" "!" "?")
"List of strings that can be moved around when placing note numbers.
@ -308,8 +304,7 @@ allowed to shuffle punctuation marks specified in this list in order to
place note numbers according to rules defined in `org-cite-note-rules'."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(repeat string)
:safe t)
:type '(repeat string))
;;; Citation processors

View File

@ -1,21 +1,23 @@
;;; ol-doi.el --- DOI links support in Org -*- lexical-binding: t; -*-
;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:

View File

@ -178,8 +178,7 @@ link.
:group 'org-link
:package-version '(Org . "9.1")
:type '(alist :tag "Link display parameters"
:value-type plist)
:safe nil)
:value-type plist))
(defcustom org-link-descriptive t
"Non-nil means Org displays descriptive links.
@ -335,8 +334,7 @@ another window."
(cons (const wl)
(choice
(const wl)
(const wl-other-frame))))
:safe nil)
(const wl-other-frame)))))
(defcustom org-link-search-must-match-exact-headline 'query-to-create
"Non-nil means internal fuzzy links can only match headlines.
@ -385,15 +383,13 @@ single keystroke rather than having to type \"yes\"."
:type '(choice
(const :tag "with yes-or-no (safer)" yes-or-no-p)
(const :tag "with y-or-n (faster)" y-or-n-p)
(const :tag "no confirmation (dangerous)" nil))
:safe nil)
(const :tag "no confirmation (dangerous)" nil)))
(defcustom org-link-shell-skip-confirm-regexp ""
"Regexp to skip confirmation for shell links."
:group 'org-link-follow
:version "24.1"
:type 'regexp
:safe nil)
:type 'regexp)
(defcustom org-link-elisp-confirm-function 'yes-or-no-p
"Non-nil means ask for confirmation before executing Emacs Lisp links.
@ -410,15 +406,13 @@ single keystroke rather than having to type \"yes\"."
:type '(choice
(const :tag "with yes-or-no (safer)" yes-or-no-p)
(const :tag "with y-or-n (faster)" y-or-n-p)
(const :tag "no confirmation (dangerous)" nil))
:safe nil)
(const :tag "no confirmation (dangerous)" nil)))
(defcustom org-link-elisp-skip-confirm-regexp ""
"A regexp to skip confirmation for Elisp links."
:group 'org-link-follow
:version "24.1"
:type 'regexp
:safe nil)
:type 'regexp)
(defgroup org-link-store nil
"Options concerning storing links in Org mode."

View File

@ -279,8 +279,7 @@ before org.el is loaded."
:type '(choice
(const :tag "A double click follows the link" double)
(const :tag "Unconditionally follow the link with mouse-1" t)
(integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))
:safe t)
(integer :tag "mouse-1 click does not follow the link if longer than N ms" 450)))
(defcustom org-tab-follows-link nil
"Non-nil means on links TAB will follow the link.
@ -300,7 +299,7 @@ implementation is bad."
In tables, the special behavior of RET has precedence."
:group 'org-link-follow
:type 'boolean
:safe t)
:safe #'booleanp)
;;; Functions

View File

@ -326,17 +326,19 @@ it for output."
;;; Indentation
(defun org-do-remove-indentation (&optional n)
(defun org-do-remove-indentation (&optional n skip-fl)
"Remove the maximum common indentation from the buffer.
When optional argument N is a positive integer, remove exactly
that much characters from indentation, if possible. Return nil
if it fails."
that much characters from indentation, if possible. When
optional argument SKIP-FL is non-nil, skip the first
line. Return nil if it fails."
(catch :exit
(goto-char (point-min))
;; Find maximum common indentation, if not specified.
(let ((n (or n
(let ((min-ind (point-max)))
(save-excursion
(when skip-fl (forward-line))
(while (re-search-forward "^[ \t]*\\S-" nil t)
(let ((ind (current-indentation)))
(if (zerop ind) (throw :exit nil)
@ -344,6 +346,7 @@ if it fails."
min-ind))))
(if (zerop n) (throw :exit nil)
;; Remove exactly N indentation, but give up if not possible.
(when skip-fl (forward-line))
(while (not (eobp))
(let ((ind (progn (skip-chars-forward " \t") (current-column))))
(cond ((eolp) (delete-region (line-beginning-position) (point)))

View File

@ -99,8 +99,7 @@ Any `face' text property on the returned string overrides
`org-num-face'."
:group 'org-appearance
:package-version '(Org . "9.3")
:type 'function
:safe nil)
:type 'function)
(defcustom org-num-max-level nil
"Level below which headlines are not numbered.

View File

@ -38,6 +38,7 @@
(require 'org-keys)
(declare-function org-mode "org" ())
(declare-function org--get-expected-indentation "org" (element contentsp))
(declare-function org-element-at-point "org-element" ())
(declare-function org-element-class "org-element" (datum &optional parent))
(declare-function org-element-context "org-element" (&optional element))
@ -327,7 +328,8 @@ a cons cell (LINE . COLUMN) or symbol `end'. See also
(if (>= pos end) 'end
(org-with-wide-buffer
(goto-char (max beg pos))
(cons (count-lines beg (line-beginning-position))
(cons (count-lines (save-excursion (goto-char beg) (line-beginning-position))
(line-beginning-position))
;; Column is relative to the end of line to avoid problems of
;; comma escaping or colons appended in front of the line.
(- (point) (min end (line-end-position)))))))
@ -445,6 +447,7 @@ Assume point is in the corresponding edit buffer."
org-src--content-indentation
0))))
(use-tabs? (and (> org-src--tab-width 0) t))
(preserve-fl (eq org-src--source-type 'latex-fragment))
(source-tab-width org-src--tab-width)
(contents (org-with-wide-buffer
(let ((eol (line-end-position)))
@ -466,7 +469,8 @@ Assume point is in the corresponding edit buffer."
;; Add INDENTATION-OFFSET to every line in buffer,
;; unless indentation is meant to be preserved.
(when (> indentation-offset 0)
(while (not (eobp))
(when preserve-fl (forward-line))
(while (not (eobp))
(skip-chars-forward " \t")
(when (or (not (eolp)) ; not a blank line
(and (eq (point) (marker-position marker)) ; current line
@ -518,7 +522,13 @@ Leave point in edit buffer."
(source-tab-width (if indent-tabs-mode tab-width 0))
(type (org-element-type datum))
(block-ind (org-with-point-at (org-element-property :begin datum)
(current-indentation)))
(cond
((save-excursion (skip-chars-backward " \t") (bolp))
(current-indentation))
((org-element-property :parent datum)
(org--get-expected-indentation
(org-element-property :parent datum) nil))
(t (current-indentation)))))
(content-ind org-edit-src-content-indentation)
(blank-line (save-excursion (beginning-of-line)
(looking-at-p "^[[:space:]]*$")))
@ -548,7 +558,8 @@ Leave point in edit buffer."
(insert contents)
(remove-text-properties (point-min) (point-max)
'(display nil invisible nil intangible nil))
(unless preserve-ind (org-do-remove-indentation))
(let ((lf (eq type 'latex-fragment)))
(unless preserve-ind (org-do-remove-indentation (and lf block-ind) lf)))
(set-buffer-modified-p nil)
(setq buffer-file-name nil)
;; Initialize buffer.

View File

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.5"))
(let ((org-git-version "release_9.5-30-g10dc9d"))
org-git-version))
(provide 'org-version)

View File

@ -3630,7 +3630,7 @@ When this is non-nil, the headline after the keyword is set to the
:group 'org-appearance
:package-version '(Org . "9.4")
:type 'boolean
:safe t)
:safe #'booleanp)
(defcustom org-fontify-done-headline t
"Non-nil means change the face of a headline if it is marked DONE.
@ -5113,6 +5113,7 @@ stacked delimiters is N. Escaping delimiters is not possible."
'(invisible t))
(add-text-properties (match-beginning 3) (match-end 3)
'(invisible t)))
(goto-char (match-end 0))
(throw :exit t))))))))
(defun org-emphasize (&optional char)

View File

@ -795,7 +795,7 @@ Most common values are:
:group 'org-export-html
:package-version '(Org . "9.4")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-html-with-latex org-export-with-latex
"Non-nil means process LaTeX math snippets.
@ -903,7 +903,7 @@ numbers are enabled."
:group 'org-export-html
:package-version '(Org . "9.3")
:type 'boolean
:safe t)
:safe #'booleanp)
;;;; Table

View File

@ -11,12 +11,12 @@
;; This file is part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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.
@ -594,7 +594,7 @@ such as the one tagged with PS."
;;;; Export Block
(defun org-koma-letter-export-block (export-block contents info)
(defun org-koma-letter-export-block (export-block _contents _info)
"Transcode an EXPORT-BLOCK element into KOMA Scrlttr2 code.
CONTENTS is nil. INFO is a plist used as a communication
channel."
@ -604,7 +604,7 @@ channel."
;;;; Export Snippet
(defun org-koma-letter-export-snippet (export-snippet contents info)
(defun org-koma-letter-export-snippet (export-snippet _contents _info)
"Transcode an EXPORT-SNIPPET object into KOMA Scrlttr2 code.
CONTENTS is nil. INFO is a plist used as a communication
channel."

View File

@ -413,7 +413,7 @@ to \"\\autoref{%s}\" or \"\\cref{%s}\" for example."
:group 'org-export-latex
:type 'string
:package-version '(Org . "9.5")
:safe t)
:safe #'stringp)
;;;; Preamble
@ -793,7 +793,7 @@ default we use here encompasses both."
:group 'org-export-latex
:package-version '(Org . "9.5")
:type 'string
:safe t)
:safe #'stringp)
(defcustom org-latex-default-table-mode 'table
"Default mode for tables.

View File

@ -548,7 +548,7 @@ in `completion-at-point-functions' (which see)."
(lambda (s)
(push s retval)
(cl-loop
for (shorthand . longhand) in elisp-shorthands
for (shorthand . longhand) in read-symbol-shorthands
for full-name = (symbol-name s)
when (string-prefix-p longhand full-name)
do (let ((sym (make-symbol
@ -559,17 +559,17 @@ in `completion-at-point-functions' (which see)."
(push sym retval)
retval))))
retval)))
(cond ((null elisp-shorthands) obarray)
(cond ((null read-symbol-shorthands) obarray)
((and obarray-cache
(gethash (cons (current-buffer) elisp-shorthands)
(gethash (cons (current-buffer) read-symbol-shorthands)
obarray-cache)))
(obarray-cache
(puthash (cons (current-buffer) elisp-shorthands)
(puthash (cons (current-buffer) read-symbol-shorthands)
(obarray-plus-shorthands)
obarray-cache))
(t
(setq obarray-cache (make-hash-table :test #'equal))
(puthash (cons (current-buffer) elisp-shorthands)
(puthash (cons (current-buffer) read-symbol-shorthands)
(obarray-plus-shorthands)
obarray-cache)))))
@ -2126,7 +2126,7 @@ Runs in a batch-mode Emacs. Interactively use variable
(pp collected)))
(put 'elisp-shorthands 'safe-local-variable #'consp)
(put 'read-symbol-shorthands 'safe-local-variable #'consp)
(provide 'elisp-mode)
;;; elisp-mode.el ends here

View File

@ -68,6 +68,28 @@
`(menu-item "Find Definition" xref-find-definitions-at-mouse
:help ,(format "Find definition of `%s'" identifier))
'prog-separator)))
(when (thing-at-mouse click 'symbol)
(define-key-after menu [select-region mark-symbol]
`(menu-item "Symbol"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'symbol))
:help "Mark the symbol at click for a subsequent cut/copy")
'mark-whole-buffer))
(define-key-after menu [select-region mark-list]
`(menu-item "List"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list))
:help "Mark the list at click for a subsequent cut/copy")
'mark-whole-buffer)
(define-key-after menu [select-region mark-defun]
`(menu-item "Defun"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun))
:help "Mark the defun at click for a subsequent cut/copy")
'mark-whole-buffer)
;; Include text-mode select menu only in strings and comments.
(when (nth 8 (save-excursion (syntax-ppss (posn-point (event-end click)))))
(text-mode-menu menu click))
menu)
(defvar prog-mode-map

View File

@ -185,7 +185,8 @@ and you want to simplify them for the mode line
(defvar-local which-func-mode nil
"Non-nil means display current function name in mode line.
This makes a difference only if `which-function-mode' is non-nil.")
This makes a difference only if variable `which-function-mode' is
non-nil.")
(add-hook 'after-change-major-mode-hook #'which-func-ff-hook t)

80
lisp/shorthands.el Normal file
View File

@ -0,0 +1,80 @@
;;; shorthands.el --- Read code considering Elisp shorthands -*- lexical-binding: t; -*-
;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: lisp
;; 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/>.
;;; Commentary:
;; Basic helpers for loading files with Shorthands.
;;; Code:
(require 'files)
(require 'mule)
(eval-when-compile (require 'cl-lib))
(defun hack-read-symbol-shorthands ()
"Compute `read-symbol-shorthands' from Local Variables section."
;; FIXME: relies on the `hack-local-variables--find-variables'
;; detail of files.el. That function should be exported,
;; possibly be refactored into two parts, since we're only
;; interested in basic "Local Variables" parsing.
(alist-get 'read-symbol-shorthands (hack-local-variables--find-variables)))
(setq hack-read-symbol-shorthands-function #'hack-read-symbol-shorthands)
;; FIXME: move this all to progmodes/elisp-mode.el? OTOH it'd make
;; more sense there, OTOH all the elisp font-lock stuff is actually in
;; lisp/emacs-lisp/lisp-mode.el, which isn't right either. So
;; shorthand font-locking logic is probably better here for now.
(defface elisp-shorthand-font-lock-face
'((t :inherit font-lock-keyword-face :foreground "cyan"))
"Face for highlighting shorthands in Emacs Lisp."
:version "28.1"
:group 'font-lock-faces)
(defun shorthands--mismatch-from-end (str1 str2)
(cl-loop with l1 = (length str1) with l2 = (length str2)
for i from 1
for i1 = (- l1 i) for i2 = (- l2 i)
while (and (>= i1 0) (>= i2 0) (eq (aref str1 i1) (aref str2 i2)))
finally (return (1- i))))
(defun shorthands-font-lock-shorthands (limit)
(when read-symbol-shorthands
(while (re-search-forward
(eval-when-compile
(concat "\\_<\\(" lisp-mode-symbol-regexp "\\)\\_>"))
limit t)
(let* ((existing (get-text-property (match-beginning 1) 'face))
(probe (and (not (memq existing '(font-lock-comment-face
font-lock-string-face)))
(intern-soft (match-string 1))))
(sname (and probe (symbol-name probe)))
(mm (and sname (shorthands--mismatch-from-end
(match-string 1) sname))))
(unless (or (null mm) (= mm (length sname)))
(add-face-text-property (match-beginning 1) (1+ (- (match-end 1) mm))
'elisp-shorthand-font-lock-face))))))
(font-lock-add-keywords 'emacs-lisp-mode '((shorthands-font-lock-shorthands)) t)
;;; shorthands.el ends here

View File

@ -6437,7 +6437,9 @@ of fill.el (for example `fill-region')."
(defun internal--format-docstring-line (string &rest objects)
"Format a single line from a documentation string out of STRING and OBJECTS.
Signal an error if STRING contains a newline.
This is intended for internal use only."
This is intended for internal use only. Avoid using this for the
first line of a docstring; the first line should be a complete
sentence (see Info node `(elisp) Documentation Tips')."
(when (string-match "\n" string)
(error "Unable to fill string containing newline: %S" string))
(internal--fill-string-single-line (apply #'format string objects)))

View File

@ -1211,13 +1211,26 @@ Interactively, ARG selects the ARGth different frame to move to."
"Detach tab number FROM-NUMBER to a new frame.
Interactively or without argument, detach current tab."
(interactive (list (1+ (tab-bar--current-tab-index))))
(let* ((tab (nth (1- (or from-number 1)) (funcall tab-bar-tabs-function)))
(tab-name (alist-get 'name tab))
(let* ((tabs (funcall tab-bar-tabs-function))
(tab-index (1- (or from-number (1+ (tab-bar--current-tab-index tabs)))))
(tab-name (alist-get 'name (nth tab-index tabs)))
;; On some window managers, `make-frame' selects the new frame,
;; so previously selected frame is saved to `from-frame'.
(from-frame (selected-frame))
(new-frame (make-frame `((name . ,tab-name)))))
(tab-bar-move-tab-to-frame nil nil from-number new-frame nil)
(tab-bar-move-tab-to-frame nil from-frame from-number new-frame nil)
(with-selected-frame new-frame
(tab-bar-close-tab))))
(defun tab-bar-move-window-to-tab ()
"Detach the selected window to a new tab."
(interactive)
(let ((tab-bar-new-tab-choice 'window))
(tab-bar-new-tab))
(tab-bar-switch-to-recent-tab)
(delete-window)
(tab-bar-switch-to-recent-tab))
(defcustom tab-bar-new-tab-to 'right
"Defines where to create a new tab.
@ -1264,9 +1277,10 @@ After the tab is created, the hooks in
(select-window (minibuffer-selected-window)))
(let ((ignore-window-parameters t))
(delete-other-windows))
;; Create a new window to get rid of old window parameters
;; (e.g. prev/next buffers) of old window.
(split-window) (delete-window)
(unless (eq tab-bar-new-tab-choice 'window)
;; Create a new window to get rid of old window parameters
;; (e.g. prev/next buffers) of old window.
(split-window) (delete-window))
(let ((buffer
(if (functionp tab-bar-new-tab-choice)
(funcall tab-bar-new-tab-choice)

View File

@ -574,7 +574,10 @@ For use in `tab-line-tab-face-functions'."
;; handle tab-line scrolling
(window-parameter nil 'tab-line-hscroll)
;; for setting face 'tab-line-tab-current'
(eq (selected-window) (old-selected-window))))
(eq (selected-window) (old-selected-window))
(and (memq 'tab-line-tab-face-modified
tab-line-tab-face-functions)
(buffer-file-name) (buffer-modified-p))))
(cache (window-parameter nil 'tab-line-cache)))
;; Enable auto-hscroll again after it was disabled on manual scrolling.
;; The moment to enable it is when the window-buffer was updated.

View File

@ -5,18 +5,20 @@
;; Author: Stefan Kangas <stefan@marxist.se>
;; Keywords: internal
;; This program is free software; you can redistribute it and/or modify
;; 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.
;; This program is distributed in the hope that it will be useful,
;; 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 this program. If not, see <https://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:

View File

@ -768,7 +768,7 @@ space does not end a sentence, so don't break a line there."
(setq first nil
linebeg (+ (point) (length actual-fill-prefix))))
(move-to-column (current-fill-column))
(if (when (< (point) to)
(if (when (and (< (point) to) (< linebeg to))
;; Find the position where we'll break the line.
;; Use an immediately following space, if any.
;; However, note that `move-to-column' may overshoot

View File

@ -814,7 +814,7 @@ in order to only add another reference in the same cite command."
(interactive)
(reftex-citation nil ?t))
(defvar reftex-select-bib-map)
(defvar reftex-select-bib-mode-map)
(defvar reftex--found-list)
(defun reftex-offer-bib-menu ()
"Offer bib menu and return list of selected items."
@ -870,7 +870,7 @@ in order to only add another reference in the same cite command."
(reftex-select-item
reftex-citation-prompt
reftex-citation-help
reftex-select-bib-map
reftex-select-bib-mode-map
nil
'reftex-bibtex-selection-callback nil))
(setq key (car rtn)

View File

@ -533,7 +533,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
(cons (cdr cell) (- (match-end 0) (match-end 1)))
nil)))
(defvar reftex-select-label-map)
(defvar reftex-select-label-mode-map)
(defun reftex-offer-label-menu (typekey)
;; Offer a menu with the appropriate labels.
(let* ((buf (current-buffer))
@ -605,7 +605,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
(reftex-select-item
reftex-select-label-prompt
reftex-select-label-help
reftex-select-label-map
reftex-select-label-mode-map
offset
'reftex-show-label-location follow))
(setq key (car rtn)

View File

@ -95,6 +95,28 @@ inherit all the commands defined in this map.")
:style toggle
:selected (memq 'turn-on-auto-fill text-mode-hook)]))
(defun text-mode-menu (menu click)
"Populate MENU with text selection commands at CLICK."
(when (thing-at-mouse click 'word)
(define-key-after menu [select-region mark-word]
`(menu-item "Word"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'word))
:help "Mark the word at click for a subsequent cut/copy")
'mark-whole-buffer))
(define-key-after menu [select-region mark-sentence]
`(menu-item "Sentence"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'sentence))
:help "Mark the sentence at click for a subsequent cut/copy")
'mark-whole-buffer)
(define-key-after menu [select-region mark-paragraph]
`(menu-item "Paragraph"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'paragraph))
:help "Mark the paragraph at click for a subsequent cut/copy")
'mark-whole-buffer)
menu)
(define-derived-mode text-mode nil "Text"
"Major mode for editing text written for humans to read.
@ -104,7 +126,8 @@ You can thus get the full benefit of adaptive filling
\\{text-mode-map}
Turning on Text mode runs the normal hook `text-mode-hook'."
(setq-local text-mode-variant t)
(setq-local require-final-newline mode-require-final-newline))
(setq-local require-final-newline mode-require-final-newline)
(add-hook 'context-menu-functions 'text-mode-menu 10 t))
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent"
"Major mode for editing text, with leading spaces starting a paragraph.

View File

@ -67,7 +67,7 @@ matching the white space). The pattern is matched case-sensitive regardless of
the value of `case-fold-search' setting."
:version "25.1"
:type 'regexp
:safe t)
:safe #'stringp)
(defcustom tildify-pattern-alist ()
"Alist specifying where to insert hard spaces.
@ -112,7 +112,7 @@ If nil, current major mode has no way to represent a hard space."
" ")
(const :tag "No-break space (U+00A0)" "\u00A0")
(string :tag "Custom string"))
:safe t)
:safe #'string-or-null-p)
(defcustom tildify-string-alist ()
"Alist specifying what is a hard space in the current major mode.

View File

@ -59,7 +59,7 @@ with %, as follows.
%#p `am' or `pm' %P gives uppercase: `AM' or `PM'
%02S seconds
%w day number of week, Sunday is 0
%02y 2-digit year: `03' %Y 4-digit year: `2003'
%02y 2-digit year %Y 4-digit year
%Z time zone name: `EST' %#Z gives lowercase: `est'
%5z time zone offset: `-0500' (since Emacs 27; see note below)

View File

@ -55,6 +55,8 @@ lwlibdir = ../lwlib
# Configuration files for .o files to depend on.
config_h = config.h $(srcdir)/conf_post.h
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
## ns-app if NS self contained app, else empty.
OTHER_FILES = @OTHER_FILES@
@ -448,14 +450,9 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
# Must be first, before dep inclusion!
ifeq ($(HAVE_NATIVE_COMP),yes)
ifeq ($(NATIVE_DISABLED),)
all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) ../native-lisp
else
all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
endif
else
all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
all: ../native-lisp
endif
.PHONY: all
@ -783,8 +780,7 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
@$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
THEFILE=$< $<c
ifeq ($(HAVE_NATIVE_COMP),yes)
ifeq ($(NATIVE_DISABLED),)
ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
## The following rules are used only when building a source tarball
## for the first time, when the native-lisp/ directory doesn't yet
## exist and needs to be created and populated with the preloaded
@ -808,11 +804,12 @@ elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln)
THEFILE=$< $<n
../native-lisp: | $(pdmp)
mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp)
LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
--bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
cp -f $@ $(bootstrap_pdmp)
endif
if test ! -d $@; then \
mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp); \
LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
--bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR); \
cp -f $@ $(bootstrap_pdmp); \
fi
endif
## VCSWITNESS points to the file that holds info about the current checkout.

View File

@ -988,7 +988,8 @@ record_xmalloc (size_t size)
/* Like malloc but used for allocating Lisp data. NBYTES is the
number of bytes to allocate, TYPE describes the intended use of the
allocated memory block (for strings, for conses, ...). */
allocated memory block (for strings, for conses, ...).
NBYTES must be positive. */
#if ! USE_LSB_TAG
void *lisp_malloc_loser EXTERNALLY_VISIBLE;
@ -1030,7 +1031,7 @@ lisp_malloc (size_t nbytes, bool clearit, enum mem_type type)
#endif
MALLOC_UNBLOCK_INPUT;
if (!val && nbytes)
if (!val)
memory_full (nbytes);
MALLOC_PROBE (nbytes);
return val;

View File

@ -293,7 +293,6 @@ extern int emacs_setenv_TZ (char const *);
ATTRIBUTE_FORMAT ((PRINTF_ARCHETYPE, string_index, first_to_check))
#define ARG_NONNULL ATTRIBUTE_NONNULL
#define ATTRIBUTE_UNUSED MAYBE_UNUSED
/* Declare NAME to be a pointer to an object of type TYPE, initialized
to the address ADDR, which may be of a different type. Accesses

View File

@ -2932,8 +2932,9 @@ xg_item_label_same_p (GtkMenuItem *witem, const char *label)
char *utf8_label = get_utf8_string (label);
const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
bool is_same = (!old_label == !utf8_label
&& (!old_label || strcmp (utf8_label, old_label) == 0));
bool is_same = (old_label
? utf8_label && strcmp (utf8_label, old_label) == 0
: !utf8_label);
if (utf8_label) g_free (utf8_label);

View File

@ -4626,29 +4626,29 @@ oblookup (Lisp_Object obarray, register const char *ptr, ptrdiff_t size, ptrdiff
return tem;
}
/* Like 'oblookup', but considers 'Velisp_shorthands', potentially
recognizing that IN is shorthand for some other longhand name,
which is then then placed in OUT. In that case, memory is
malloc'ed for OUT (which the caller must free) while SIZE_OUT and
SIZE_BYTE_OUT respectively hold the character and byte sizes of the
transformed symbol name. If IN is not recognized shorthand for any
other symbol, OUT is set to point to NULL and 'oblookup' is
called. */
/* Like 'oblookup', but considers 'Vread_symbol_shorthands',
potentially recognizing that IN is shorthand for some other
longhand name, which is then then placed in OUT. In that case,
memory is malloc'ed for OUT (which the caller must free) while
SIZE_OUT and SIZE_BYTE_OUT respectively hold the character and byte
sizes of the transformed symbol name. If IN is not recognized
shorthand for any other symbol, OUT is set to point to NULL and
'oblookup' is called. */
Lisp_Object
oblookup_considering_shorthand (Lisp_Object obarray, const char *in,
ptrdiff_t size, ptrdiff_t size_byte, char **out,
ptrdiff_t *size_out, ptrdiff_t *size_byte_out)
{
Lisp_Object tail = Velisp_shorthands;
Lisp_Object tail = Vread_symbol_shorthands;
/* First, assume no transformation will take place. */
*out = NULL;
/* Then, iterate each pair in Velisp_shorthands. */
/* Then, iterate each pair in Vread_symbol_shorthands. */
FOR_EACH_TAIL_SAFE (tail)
{
Lisp_Object pair = XCAR (tail);
/* Be lenient to 'elisp-shorthands': if some element isn't a
/* Be lenient to 'read-symbol-shorthands': if some element isn't a
cons, or some member of that cons isn't a string, just skip
to the next element. */
if (!CONSP (pair))
@ -5446,10 +5446,10 @@ that are loaded before your customizations are read! */);
DEFSYM (Qchar_from_name, "char-from-name");
DEFVAR_LISP ("elisp-shorthands", Velisp_shorthands,
DEFVAR_LISP ("read-symbol-shorthands", Vread_symbol_shorthands,
doc: /* Alist of known symbol-name shorthands.
This variable's value can only be set via file-local variables.
See Info node `(elisp)Shorthands' for more details. */);
Velisp_shorthands = Qnil;
Vread_symbol_shorthands = Qnil;
DEFSYM (Qobarray_cache, "obarray-cache");
}

View File

@ -799,7 +799,7 @@ dump_tailq_length (const struct dump_tailq *tailq)
return tailq->length;
}
static void ATTRIBUTE_UNUSED
static void
dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
{
Lisp_Object link = Fcons (value, tailq->head);
@ -809,24 +809,6 @@ dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
tailq->length += 1;
}
static void ATTRIBUTE_UNUSED
dump_tailq_append (struct dump_tailq *tailq, Lisp_Object value)
{
Lisp_Object link = Fcons (value, Qnil);
if (NILP (tailq->head))
{
eassert (NILP (tailq->tail));
tailq->head = tailq->tail = link;
}
else
{
eassert (!NILP (tailq->tail));
XSETCDR (tailq->tail, link);
tailq->tail = link;
}
tailq->length += 1;
}
static bool
dump_tailq_empty_p (struct dump_tailq *tailq)
{

View File

@ -4004,7 +4004,7 @@ usage: (make-network-process &rest ARGS) */)
if (!NILP (host))
{
ptrdiff_t portstringlen ATTRIBUTE_UNUSED;
MAYBE_UNUSED ptrdiff_t portstringlen;
/* SERVICE can either be a string or int.
Convert to a C string for later use by getaddrinfo. */

View File

@ -101,14 +101,11 @@ extern void sys_cond_signal (sys_cond_t *);
extern void sys_cond_broadcast (sys_cond_t *);
extern void sys_cond_destroy (sys_cond_t *);
extern sys_thread_t sys_thread_self (void)
NODISCARD;
extern bool sys_thread_equal (sys_thread_t, sys_thread_t)
NODISCARD;
NODISCARD extern sys_thread_t sys_thread_self (void);
NODISCARD extern bool sys_thread_equal (sys_thread_t, sys_thread_t);
extern bool sys_thread_create (sys_thread_t *, thread_creation_function *,
void *)
NODISCARD;
NODISCARD extern bool sys_thread_create (sys_thread_t *,
thread_creation_function *, void *);
extern void sys_thread_yield (void);
extern void sys_thread_set_name (const char *);

View File

@ -549,13 +549,14 @@ encode_terminal_code (struct glyph *src, int src_len,
{
if (src->type == COMPOSITE_GLYPH)
{
struct composition *cmp UNINIT;
Lisp_Object gstring UNINIT;
struct composition *cmp;
Lisp_Object gstring;
int i;
nbytes = buf - encode_terminal_src;
if (src->u.cmp.automatic)
{
cmp = NULL;
gstring = composition_gstring_from_id (src->u.cmp.id);
required = src->slice.cmp.to - src->slice.cmp.from + 1;
}
@ -575,7 +576,7 @@ encode_terminal_code (struct glyph *src, int src_len,
buf = encode_terminal_src + nbytes;
}
if (src->u.cmp.automatic)
if (!cmp)
for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++)
{
Lisp_Object g = LGSTRING_GLYPH (gstring, i);

View File

@ -48,7 +48,7 @@ static exe_header_t *
read_exe_header (int fd, exe_header_t * exe_header_buffer)
{
int i;
int ret ATTRIBUTE_UNUSED;
MAYBE_UNUSED int ret;
assert (fd >= 0);
assert (exe_header_buffer != 0);
@ -111,7 +111,7 @@ fixup_executable (int fd)
exe_header_t exe_header_buffer;
exe_header_t *exe_header;
int i;
int ret ATTRIBUTE_UNUSED;
MAYBE_UNUSED int ret;
int found_data = 0;
int found_bss = 0;
@ -269,7 +269,7 @@ unexec (const char *outfile, const char *infile)
int fd_in;
int fd_out;
int ret;
int ret2 ATTRIBUTE_UNUSED;
MAYBE_UNUSED int ret2;
infile = add_exe_suffix_if_necessary (infile, infile_buffer);
outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);

View File

@ -6222,7 +6222,7 @@ Otherwise, the return value is a vector with the following fields:
static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
Lisp_Object, int, int, int *, int *);
/* The frame of the currently visible tooltip. */
/* The frame of the currently visible tooltip, or nil if none. */
static Lisp_Object tip_frame;
/* The window-system window corresponding to the frame of the
@ -6710,7 +6710,7 @@ x_hide_tip (bool delete)
if ((NILP (tip_last_frame) && NILP (tip_frame))
|| (!x_gtk_use_system_tooltips
&& !delete
&& FRAMEP (tip_frame)
&& !NILP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
&& !FRAME_VISIBLE_P (XFRAME (tip_frame))))
/* Either there's no tooltip to hide or it's an already invisible
@ -6727,7 +6727,7 @@ x_hide_tip (bool delete)
specbind (Qinhibit_quit, Qt);
/* Try to hide the GTK+ system tip first. */
if (FRAMEP (tip_last_frame))
if (!NILP (tip_last_frame))
{
struct frame *f = XFRAME (tip_last_frame);
@ -6745,7 +6745,7 @@ x_hide_tip (bool delete)
tip_last_frame = Qnil;
/* Now look whether there's an Emacs tip around. */
if (FRAMEP (tip_frame))
if (!NILP (tip_frame))
{
struct frame *f = XFRAME (tip_frame);
@ -6775,7 +6775,7 @@ x_hide_tip (bool delete)
#else /* not USE_GTK */
if (NILP (tip_frame)
|| (!delete
&& FRAMEP (tip_frame)
&& !NILP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
&& !FRAME_VISIBLE_P (XFRAME (tip_frame))))
return Qnil;
@ -6788,7 +6788,7 @@ x_hide_tip (bool delete)
specbind (Qinhibit_redisplay, Qt);
specbind (Qinhibit_quit, Qt);
if (FRAMEP (tip_frame))
if (!NILP (tip_frame))
{
struct frame *f = XFRAME (tip_frame);
@ -6931,7 +6931,7 @@ Text larger than the specified size is clipped. */)
}
#endif /* USE_GTK */
if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
{
if (FRAME_VISIBLE_P (XFRAME (tip_frame))
&& EQ (frame, tip_last_frame)
@ -7016,7 +7016,7 @@ Text larger than the specified size is clipped. */)
tip_last_string = string;
tip_last_parms = parms;
if (!FRAMEP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
if (NILP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
{
/* Add default values to frame parameters. */
if (NILP (Fassq (Qname, parms)))

View File

@ -1603,6 +1603,14 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
STRINGP (help) ? help : Qnil);
if (prev_wv)
prev_wv->next = wv;
else if (!save_wv)
{
/* This call to 'abort' pacifies gcc 11.2.1 when Emacs
is configured with --enable-gcc-warnings. FIXME: If
save_wv can be null, do something better; otherwise,
explain why save_wv cannot be null. */
abort ();
}
else
save_wv->contents = wv;
if (!NILP (descrip))

View File

@ -4049,7 +4049,7 @@ x_delete_glyphs (struct frame *f, int n)
/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable.
If they are <= 0, this is probably an error. */
static ATTRIBUTE_UNUSED void
MAYBE_UNUSED static void
x_clear_area1 (Display *dpy, Window window,
int x, int y, int width, int height, int exposures)
{
@ -10133,8 +10133,9 @@ x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
frame on it. */
dpyinfo->reference_count++;
dpyinfo->terminal->reference_count++;
if (ioerror)
dpyinfo->display = 0;
}
if (ioerror) dpyinfo->display = 0;
/* First delete frames whose mini-buffers are on frames
that are on the dead display. */

View File

@ -69,6 +69,7 @@
(defvar tramp-connection-properties)
(defvar tramp-copy-size-limit)
(defvar tramp-display-escape-sequence-regexp)
(defvar tramp-fuse-unmount-on-cleanup)
(defvar tramp-inline-compress-start-size)
(defvar tramp-persistency-file-name)
(defvar tramp-remote-path)
@ -5884,10 +5885,7 @@ Use direct async.")
tramp-allow-unsafe-temporary-files
(inhibit-message t)
;; tramp-rclone.el and tramp-sshfs.el cache the mounted files.
(tramp-cleanup-connection-hook
(append
(and (tramp--test-fuse-p) '(tramp-fuse-unmount))
tramp-cleanup-connection-hook))
(tramp-fuse-unmount-on-cleanup t)
auto-save-default
noninteractive)

View File

@ -1,23 +1,31 @@
(defun f-test ()
(let ((elisp-shorthands '(("foo-" . "bar-"))))
(let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(with-temp-buffer
(insert "(foo-bar)")
(goto-char (point-min))
(read (current-buffer)))))
(defun f-test2 ()
(let ((elisp-shorthands '(("foo-" . "bar-"))))
(let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(read-from-string "(foo-bar)")))
(defun f-test3 ()
(let ((elisp-shorthands '(("foo-" . "bar-"))))
(let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(intern "foo-bar")))
(defvar f-test-complete-me 42)
(elisp--foo-test3)
(defun #_f-test4--- () 84)
(defmacro f-define-test-5 ())
;; should be font locked with both shorthand
;; highlighting _and_ macro highlighting.
(f-define-test-5)
(when nil
(f-test3)
(f-test2)
@ -26,5 +34,5 @@
;; Local Variables:
;; elisp-shorthands: (("f-" . "elisp--foo-"))
;; read-symbol-shorthands: (("f-" . "elisp--foo-"))
;; End:

View File

@ -1015,7 +1015,7 @@ evaluation of BODY."
(shorthand-sname (format "s-%s" gsym))
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
(should (equal (let ((elisp-shorthands
(should (equal (let ((read-symbol-shorthands
'(("s-" . "shorthand-longhand-"))))
(with-temp-buffer
(insert shorthand-sname)
@ -1029,7 +1029,7 @@ evaluation of BODY."
(shorthand-sname (format "s-%s" gsym))
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
(should (equal (let ((elisp-shorthands
(should (equal (let ((read-symbol-shorthands
'(("s-" . "shorthand-longhand-"))))
(car (read-from-string shorthand-sname)))
expected))

View File

@ -769,15 +769,14 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350."
(ert-deftest subr-test-internal--format-docstring-line ()
(should
(string= (let ((fill-column 60))
(string= (let ((fill-column 70))
(internal--format-docstring-line
"Emacs is the advanced, extensible, customizable, \
self-documenting editor. This manual describes how to edit with Emacs and \
some of the ways to customize it; it corresponds to GNU Emacs version 28.1."))
"Emacs is the advanced, extensible, customizable,
self-documenting editor. This manual describes how to edit
with Emacs and some of the ways to customize it; it
corresponds to GNU Emacs version 28.1."))
"In addition to any hooks its parent mode might have run, this \
mode runs the hook foo-bar-baz-very-long-name-indeed-mode-hook, as the final \
or penultimate step during initialization."))
"In addition to any hooks its parent mode might have run, this mode
runs the hook foo-bar-baz-very-long-name-indeed-mode-hook, as the
final or penultimate step during initialization."))
(should-error (internal--format-docstring-line "foo\nbar")))
(ert-deftest test-ensure-list ()