By putting delimiter syntax on the last character of Python
triple-quoted strings, this makes syntax-ppss be more accurate.
Previously:
emacs -Q something.py
type two single quotes
M-: (nth 3 (syntax-ppss))
notice how the return value says you're outside a string, correctly
type another quote
M-: (nth 3 (syntax-ppss))
notice how the return value says you're inside a string, correctly
backspace the quote just entered
M-: (nth 3 (syntax-ppss))
notice how the return value says you're inside a string, incorrectly
With this patch the last step is corrected. This helps things like
electric-pair-mode. Also, the test
python-syntax-after-python-backspace now passes, again.
* lisp/progmodes/python.el (python-syntax-stringify): Put
delimiter syntax in "inner" of the surrouding triple quotes.
* test/lisp/progmodes/python-tests.el
(python-syntax-after-python-backspace): Passes again.
In python-tests.el, the triple-quote pairing tests are passing
incorrectly, i.e. the auto-pairing functionality they purport to guard
isn't really working for users trying it interactively. Added a new
failing test, soon to be fixed.
In electric-tests.el, added tests for Python, too.
* test/lisp/electric-tests.el (define-electric-pair-test): Also run
main tests for python-mode. (pair-some-quotes-skip-others): Test
another slightly different pairing.
* test/lisp/progmodes/python-tests.el
(python-triple-double-quote-pairing): Rename from
python-triple-quote-pairing.
(python-triple-single-quote-pairing): New test.
Extract the "open newline between pairs behaviour" into its own
function, electric-pair-open-newline-between-pairs-psif.
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Add
docstring.
(electric-pair-open-newline-between-pairs-psif): New function.
(electric-pair-mode): Add/remove electric-pair-open-newline-between-pairs-psif
'blink-paren-function' and its timers could sometimes interfere with
the tests and slow them down significantly.
* test/lisp/electric-tests.el (call-with-saved-electric-modes):
Bind blink-paren-function to nil.
* lisp/gnus/mm-view.el (mm-inline-wash-with-file): This is only
called from the `links' handler, and it passes in `file' expecting
that to be dynamically bound. Which is a very, very confusing
interface, but make that work again, anyway.
* lisp/dired-aux.el (dired-compress-file-suffixes): Specify the
directory in the tar targets.
(dired-uncompress-file): New function (bug#47058). This asks what
directory to uncompress to.
(dired-compress-file): Use it.
This should have been part of cb12a84f2c
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc,
gnus-inews-do-gcc): Don't encode group names.
* doc/emacs/maintaining.texi (Project File Commands):
Mention the new command and update the bindings information.
* lisp/progmodes/project.el (project-find-dir):
New command (bug#43153).
(project-prefix-map): Use 'd' as its binding.
Move 'project-dired' to 'D'.
(project-switch-commands):
Replace 'project-dired' with 'project-find-dir'.
This covers both sequences using Zero-Width-Joiner codepoints and
those without. Bug#39799, I hope.
* .gitignore: Add emoji-zwj.el
* admin/notes/unicode: Add emoji-zwj-sequences.txt and
emoji-sequences.txt references. Describe how to test after updating
to a newer Unicode version.
* admin/unidata/Makefile.in (all): add emoji-zwj.el as a dependency.
(emoji-zwj.el): Add target plus rules for building.
(gen-clean): Add emoji-zwj.el.
* admin/unidata/README: Add emoji-zwj-sequences.txt and
emoji-sequences.txt references.
* admin/unidata/blocks.awk: Force emoji script to be used for certain
codepoints that are used by the Unicode sequences.
* admin/unidata/emoji-sequences.txt: New file.
* admin/unidata/emoji-zwj-sequences.txt: New file.
* admin/unidata/emoji-zwj.awk: New file. Derives
composition-function-table rules from emoji-zwj-sequences.txt, plus
hardcodes some derived manually from emoji-sequences.txt.
* etc/NEWS: Announce change.
* lisp/international/characters.el: Load the generated emoji-zwj.el
* src/Makefile.in (emoji-zwj): New target.
(temacs): Add emoji-zwj as a dependency.
* lisp/url/url-http.el (url-http-handle-authentication): Return t
instead of raising an error, instructing the caller to invoke the
request specific error handler (bug#50511).
The Emoji property describes which codepoints can be displayed as
emoji, but Emoji_Presentation governs which are displayed as emoji by
default.
* admin/notes/unicode: Adjust check-emoji-coverage to look in the
Emoji_Presentation sections of emoji-data.txt
* admin/unidata/blocks.awk: Assign emoji script using the
Emoji_Presentation section.
* lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-vc):
Pass file or directory name in question as the first argument to the
backend's repository-url implementation (bug#50689). Use when-let
and seq-some to flatten nested conditionals.
* lisp/loadup.el (dump-mode): Temporarily bind `lexical-binding` to
nil while dumping. Otherwise, it will be t in Emacs by default
and that is not our intention (yet).
* doc/misc/eww.texi (Advanced): Mention url-retrieve-synchronously
for eww-retrieve-command.
* lisp/net/eww.el (eww-retrieve-command): Add choice 'sync' for
url-retrieve-synchronously.
(eww-retrieve): Use value 'sync' for url-retrieve-synchronously.
(eww-isearch-next-buffer): Let-bind eww-retrieve-command to 'sync'.
* doc/lispref/commands.texi (Recursive Editing): Mention what happens
when throwing a string or any other value to 'exit.
* src/keyboard.c (Frecursive_edit): Document throwing a function
to 'exit (bug#49700).
* lisp/minibuffer.el (minibuffer-quit-recursive-edit): New optional
argument to specify how many levels of recursion to quit.
* src/eval.c (internal_catch): Remove special handling of 'exit
tag (bug#49700).
* src/minibuf.c (Fabort_minibuffers): Use
minibuffer-quit-recursive-edit to quit multiple levels of minibuffer
recursion.
* src/xdisp.c (handle_fontified_prop): Set the frame's
inhibit_clear_image_cache flag around calls to
'fontification-functions', to avoid Lisp triggering the clearing
of image and/or face caches behind redisplay's back. (Big#50571)
* lisp/auth-source.el (auth-source-netrc-create)
(auth-source-secrets-create): Set :save-function only for non
empty passwords.
* lisp/net/tramp.el (tramp-read-passwd): Don't save empty passwords.
* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Adapt test.
(auth-source-test-netrc-create-secret): New test.
* doc/misc/eshell.texi (Writing a module, Module testing)
(Directory handling, Key rebinding, Smart scrolling)
(Terminal emulation): Explicitly say that these sections remain to
be written. (Bug#49306)
The reader has an extra 1-char unread buffer that was incorrectly
initialised to 0, which means that the first character read would
always be NUL. As this is often the code that looks for the
lexical-binding cookie, the first loaded source module would be
treated as dynamically bound. During bootstrapping this is loadup.el
and so its local variables got dumped into the global environment.
* src/lread.c (unread_char): Initialise to empty.
(Fload): Initialise here too just in case.