1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

909 Commits

Author SHA1 Message Date
Stefan Kangas
841614c722 Merge from origin/emacs-29
9e105d483f Fix c-ts-mode indentation for statement after preproc (bu...
a72a55e3e4 Fix c/c++-ts-mode's mode lighter
67befc1f5a Eglot: use shell-file-name in eglot--cmd (bug#61748)
1c7b2673bd Avoid signaling errors in url-basic-auth when password is...
756225e377 Fix wdired-tests on MS-Windows
a137f71c67 Improvements to xwidget on macOS (bug#60703)
3f43a16bc6 ; Avoid byte-compilation warning in c-ts-mode.el
2023-03-03 06:30:12 +01:00
Eli Zaretskii
1c7b2673bd Avoid signaling errors in url-basic-auth when password is nil
* lisp/url/url-auth.el (url-basic-auth): Handle nil PASS.
Suggested by Ellis Kenyo <me@elken.dev>.  (Bug#61411)
2023-03-02 14:35:15 +02:00
Mattias Engdegård
68cc286c04 Fix some useless condition-case forms
* lisp/progmodes/cperl-mode.el (cperl-calculate-indent):
* lisp/progmodes/verilog-mode.el (verilog--suppressed-warnings):
Add error handler, seemingly the intention here.
* lisp/url/url-gw.el (url-open-stream): Remove condition-case;
it was neutered in 2006.
2023-02-28 17:12:54 +01:00
Stefan Kangas
2c7e87c73a Use more recent public_suffix_list.dat where possible
* lisp/url/url-domsuf.el (url-domsuf--public-suffix-file): New
function to look for a more recent version of public_suffix_list.dat
on the system than the one that is shipped with Emacs.
(url-domsuf-parse-file): Use above new function.
* test/lisp/url/url-domsuf-tests.el
(url-domsuf--public-suffix-file): New test.
2023-02-17 22:50:13 +01:00
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals

# Conflicts:
#	etc/refcards/ru-refcard.tex
#	lib/explicit_bzero.c
#	m4/explicit_bzero.m4
2023-01-01 05:47:47 -05:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Kangas
b4941419c5 ; Fix typos in some function names
* lisp/cedet/semantic/decorate/include.el
(semantic-decoration-unparsed-include-reference-reset): Rename
from 'semantic-decoration-unparsed-include-refrence-reset'.
* lisp/emacs-lisp/rx.el (rx--normalize-or-arg): Rename from
'rx--normalise-or-arg'.
* lisp/frame.el (frame--current-background-mode): Rename from
'frame--current-backround-mode'.
* lisp/url/url-future.el (url-future-canceled-p): Rename from
'url-future-cancelled-p'.  Update all uses.  Make old names into
obsolete function aliases.
2022-12-20 06:15:55 +01:00
Stefan Kangas
16318bfb51 ; Fix typos 2022-11-20 12:59:39 +01:00
F. Jason Park
5699e43f27 Accommodate ircs:// URLs in url-irc and browse-url
* lisp/url/url-irc.el (url-irc-function): Change signature of function
interface to expect a final "scheme" argument, such as "ircs".
(url-irc): Call `url-irc-function' with new positional argument, the
scheme extracted via `url-type' from the input URL.
(url-irc-erc, url-irc-rcirc, url-irc-zenirc): Accept a URL scheme as a
sixth positional arg.
(url-ircs-default-port, url-ircs): Add new autoloaded constant and
alias for `url-scheme-get-property' to recognize.  Do this to avoid
having to add another file.
* lisp/net/browse-url.el (browse-url-irc-function): Add new option.
(browse-url--irc): Add new function to call `browse-url-irc-function'.
(browse-url-default-handlers): Add "irc://" entry.
(browse-url-irc): Add new function to serve as general handler for
"irc://" URLS.  Accept trailing variadic args to accommodate
non-browse-url interfaces as well.
* test/lisp/net/browse-url-tests.el
(browse-url-tests-select-handler-irc): Add test for "irc://" URL
pattern.
* etc/NEWS: Mention select browse-url and url-irc
changes.  (Bug#56514.)
2022-11-16 21:34:36 -08:00
Stefan Monnier
3fa4cca3d2 * lisp/url/url-util.el (url-insert-entities-in-string): Simplify 2022-10-30 09:40:06 -04:00
Basil L. Contovounesios
38bcad5451 Pacify recent unused/ignored lexvar warnings
Lexvars with special names like 'ignored' or 'unused' are no longer
treated specially.

* lisp/ansi-color.el (ansi-color-process-output):
* lisp/cus-edit.el (customize-apropos-options):
* lisp/cus-theme.el (customize-create-theme):
* lisp/dired-aux.el (dired-hide-all):
* lisp/emacs-lisp/crm.el (crm--choose-completion-string):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-revert):
* lisp/ido.el (ido-choose-completion-string):
* lisp/international/mule-diag.el (describe-font-internal):
* lisp/mail/sendmail.el (sendmail-user-agent-compose):
* lisp/progmodes/fortran.el (fortran-uncomment-region):
* lisp/progmodes/prolog.el (prolog-inferior-guess-flavor):
* lisp/progmodes/ruby-mode.el (ruby-indent-line, ruby-indent-exp):
* lisp/url/url.el (url-mm-callback):
* lisp/xwidget.el (xwidget-webkit-history-reload): Prepend an
underscore to unused function parameter names.
* lisp/emacs-lisp/cconv.el (cconv--dummy-var): Remove unused
constant.
* lisp/files.el (hack-local-variables-filter): Remove unused lexvar.
2022-10-26 16:35:59 +03:00
Stefan Monnier
9d47364634 * lisp/url/url-file.el (url-file): Don't bind coding-system-for-read
Binding it causes errors when some of the enclosed code ends up
loading a `.el` file, and it is unnecessary since the rest of
the code (in `url-file-asynch-callback`) is already careful to
use `insert-file-contents-literally`.
2022-10-08 23:06:45 -04:00
Lars Ingebrigtsen
eb02c4d230 Kill URL buffer in url-insert-file-contents-literally
* lisp/url/url-handlers.el (url-insert-file-contents-literally):
Kill the URL buffer after use.
2022-10-02 15:50:02 +02:00
Lars Ingebrigtsen
4efb2ef572 Fix coding system problems in gnus-read-ephemeral-bug-group
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Don't
bind coding system variables, because that leads to loading other
files (like cookie files) using that coding system (bug#58227).

* lisp/url/url-handlers.el (url-insert-file-literally): New function.
(url-insert): Allow forcing no-decode.
2022-10-02 15:50:02 +02:00
Lars Ingebrigtsen
41234a21bf Fix url-retrieve-synchronously on very short timeouts
* lisp/url/url.el (url-retrieve-synchronously): Don't kill the
process buffer unless we made one (bug#58218).  This makes HTTP
free connection marking work on premature timeouts.
2022-10-01 14:51:07 +02:00
Stefan Kangas
1f29ee2d21 Delete many items obsolete since 24.3
* lisp/allout.el (allout-exposure-change-hook)
(allout-structure-added-hook, allout-structure-deleted-hook)
(allout-structure-shifted-hook):
* lisp/arc-mode.el (archive-extract-hooks):
* lisp/buff-menu.el (Buffer-menu-buffer+size-width):
* lisp/calendar/timeclock.el (timeclock-modeline-display)
(timeclock-modeline-display, timeclock-update-modeline):
* lisp/cedet/semantic/db-el.el
(semanticdb-elisp-sym-function-arglist):
* lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks):
* lisp/cedet/semantic/edit.el (semantic-change-hooks)
(semantic-edits-new-change-hooks)
(semantic-edits-delete-change-hooks)
(semantic-edits-reparse-change-hooks):
* lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks):
* lisp/comint.el (comint--unquote&expand-filename)
(comint-unquote-filename):
* lisp/custom.el (user-variable-p):
* lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer)
(dired-sort-set-modeline):
* lisp/ebuff-menu.el (Electric-buffer-menu-mode):
* lisp/emacs-lisp/byte-run.el (macro-declaration-function):
* lisp/emacs-lisp/checkdoc.el (custom-print-functions)
(checkdoc-comment-style-hooks):
* lisp/emacs-lisp/cl-lib.el (custom-print-functions):
* lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings):
* lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook):
* lisp/eshell/esh-mode.el (eshell-status-in-modeline):
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names):
* lisp/faces.el (set-face-underline-p, font-list-limit):
* lisp/files.el (automount-dir-prefix, toggle-read-only):
* lisp/filesets.el (filesets-cache-fill-content-hooks):
* lisp/frame.el (automatic-hscrolling):
* lisp/generic-x.el (javascript-generic-mode)
(javascript-generic-mode-hook):
* lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks):
* lisp/gnus/nndiary.el (nndiary-request-create-group-hooks)
(nndiary-request-update-info-hooks)
(nndiary-request-accept-article-hooks):
* lisp/htmlfontify.el (hfy-post-html-hooks):
* lisp/international/mule-cmds.el
(inactivate-current-input-method-function)
(inactivate-input-method, input-method-inactivate-hook)
(ucs-insert):
* lisp/international/quail.el (quail-inactivate)
(quail-inactivate-hook):
* lisp/international/robin.el (robin-inactivate)
(robin-inactivate-hook):
* lisp/leim/quail/hangul.el (hangul-input-method-inactivate):
* lisp/leim/quail/uni-input.el (ucs-input-inactivate):
* lisp/mail/emacsbug.el (report-emacs-bug-info):
* lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks):
* lisp/mpc.el (mpc-string-prefix-p):
* lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks)
(rcirc-receive-message-hooks, rcirc-activity-hooks):
* lisp/obsolete/crisp.el (crisp-mode-modeline-string):
* lisp/pcomplete.el (pcomplete-arg-quote-list)
(pcomplete-quote-argument):
* lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks):
* lisp/progmodes/python.el (python-info-ppss-context)
(python-info-ppss-context-type)
(python-info-ppss-comment-or-string-p, python-indent)
(python-guess-indent, python-buffer, python-preoutput-result)
(python-proc, python-send-receive, python-send-string)
(python-use-skeletons):
* lisp/progmodes/sh-script.el (sh-maybe-here-document):
* lisp/replace.el (query-replace-interactive):
* lisp/strokes.el (strokes-modeline-string):
* lisp/subr.el (redraw-modeline):
* lisp/term.el (term-default-fg-color, term-default-bg-color):
* lisp/textmodes/tex-mode.el (latex-string-prefix-p)
(tex-string-prefix-p):
* lisp/url/url-parse.el (url-recreate-url-attributes):
* lisp/vc/add-log.el (change-log-acknowledgement):
* lisp/vc/ediff-wind.el
(ediff-choose-window-setup-function-automatically):
* lisp/vc/pcvs-util.el (cvs-string-prefix-p):
* lisp/vc/vc.el (vc-string-prefix-p):
* lisp/window.el (display-buffer-function):
* lisp/winner.el (winner-mode-leave-hook): Remove many functions and
variables obsolete since 24.3.

* lisp/buff-menu.el (list-buffers--refresh):
* lisp/dired.el (dired-mode-map):
* lisp/files.el (abbreviate-file-name):
* lisp/generic-x.el (generic-default-modes):
* lisp/mh-e/mh-funcs.el (mh-kill-folder):
* lisp/progmodes/hideif.el (hide-ifdef-mode-submap):
* lisp/replace.el (query-replace-read-from):
* lisp/term.el (term):
* lisp/window.el (display-buffer): Don't use above deleted
functions and variables.

* src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete
since 24.3.
(syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr.
* lisp/subr.el (buffer-has-markers-at): Remove obsoletion
of above deleted DEFUN.
* etc/TODO: Doc fix; don't mention above deleted function.

* admin/cus-test.el (cus-test-get-options):
* lisp/pcomplete.el: Doc fixes; don't mention removed items.
; * etc/NEWS: List removed items.
2022-09-09 11:27:30 +02:00
Stefan Kangas
e13509468b Make "rlogin" method obsolete in url*.el
* lisp/url/url-about.el (url-probe-protocols): Remove "rlogin".
* lisp/url/url-gw.el (url-gateway-rlogin-host)
(url-gateway-rlogin-user-name, url-gateway-rlogin-parameters)
(url-open-rlogin): Make obsolete.  (Bug#56891)
(url-open-stream):
* lisp/url/url-misc.el (url-do-terminal-emulator): Warn when using
"rlogin".
(url-rlogin): Make obsolete.
* lisp/url/url-vars.el (url-gateway-method): Remove "rlogin"
choice.

* lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once)
* lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once): New
variables, immediately marked obsolete.

* doc/misc/url.texi (telnet/tn3270): Rename section from
"rlogin/telnet/tn3270".
(Gateways in general, Customization): Don't mention "rlogin"
method.
2022-09-03 07:23:08 +02:00
Stefan Kangas
321f33a2b1 Improve how url-http displays status messages
* lisp/url/url-util.el (url-display-message): New function.
(url-display-percentage): Make obsolete in favor of
url-display-message.

* lisp/url/url-http.el
(url-http-content-length-after-change-function):
Prefer 'url-display-message' to 'url-display-percentage'.
(url-http-content-length-after-change-function)
(url-http-chunked-encoding-after-change-function):
Remove ineffectual calls to 'url-display-percentage'.
2022-08-07 13:14:20 +02:00
Lars Ingebrigtsen
4f3a33c90f Make url-about.el obsolete (bug#56885) 2022-08-04 11:13:48 +02:00
Lars Ingebrigtsen
8348ace63a Revert "Fix about:protocols in EWW"
This reverts commit b49c174010.

We're making this obsolete instead.
2022-08-04 11:09:40 +02:00
Po Lu
b49c174010 Fix about:protocols in EWW
* lisp/net/eww.el (eww--dwim-expand-url): Handle `about: ' URLs.
(bug#56885)
* lisp/url/url-about.el (url-about): Return correct content type
for HTML data.
* lisp/url/url-http.el (url-http--get-referer): Refrain from
looking for a referrer if the lastloc had no host.
2022-08-04 15:52:03 +08:00
Stefan Kangas
d71d5b2a96 Remove superfluous autoloads from url-util.el
* lisp/url/url-util.el (timezone-parse-date)
(timezone-make-date-arpa-standard): Remove superfluous autoloads.
2022-08-03 15:41:37 +02:00
Mattias Engdegård
4bbd1f38ca ; * lisp/url/url-util.el (url-display-percentage): simplify 2022-08-03 14:09:15 +02:00
Stefan Kangas
d60ba336af Improve obsoletion of trimming functions in url-util.el
* lisp/url/url-util.el (url-eat-trailing-space): Redefine as
obsolete function alias for 'string-trim-right'.
(url-strip-leading-spaces): Redefine as obsolete function alias
for 'string-trim-left'.
2022-08-03 11:53:21 +02:00
Stefan Kangas
33b3226975 Remove some XEmacs compat code from url-util.el
These functions only exist in the XEmacs GTK support.
* lisp/url/url-util.el (url-display-percentage): Remove XEmacs
compat code.
2022-08-03 10:39:53 +02:00
Stefan Kangas
836ef4293f Make url-util space trimming functions obsolete
* lisp/url/url-util.el (url-eat-trailing-space)
(url-strip-leading-spaces): Make obsolete in favor of
'string-trim'.  Update caller.
2022-08-03 10:39:47 +02:00
Eli Zaretskii
286e308561 ; Fix system-info in url-privacy.el
* lisp/url/url-privacy.el (url-setup-privacy-info): Fix MS-Windows
configurations.
2022-08-02 20:27:46 +03:00
Stefan Kangas
2be7ed257b ; * lisp/url/url-privacy.el (url-setup-privacy-info): Simplify. 2022-08-02 18:55:24 +02:00
Stefan Kangas
74ff6acdd3 url-about: Ignore missing directories in load-path
* lisp/url/url-about.el (url-probe-protocols): Ignore missing
directories in load-path.
2022-08-02 14:02:17 +02:00
Lars Ingebrigtsen
a306d9096e Fix url-dired obsoletion warning
* lisp/url/url-file.el (url-file): Don't use obsolete url-dired
function.
2022-08-02 11:20:14 +02:00
Stefan Kangas
632b74efa3 Make url-dired.el obsolete (part 2/2)
* lisp/obsolete/url-dired.el: Add "Obsolete-since" header.
(url-dired-minor-mode-map): Minor fix.
* lisp/url/url-file.el (url-dired): Don't require.
* etc/NEWS: Announce its obsoletion.
2022-08-02 10:30:55 +02:00
Stefan Kangas
16c872409b Make url-dired.el obsolete (part 1/2)
It doesn't have any real effect since 2007.
Ref: https://lists.gnu.org/r/emacs-devel/2022-07/msg01156.html

* lisp/url/url-dired.el: Move from here...
* lisp/obsolete/url-dired.el: ...to here.
2022-08-02 10:30:50 +02:00
Stefan Kangas
22a5f02234 Doc fixes: don't mention EFS
* doc/misc/ede.texi (ede-project):
* doc/misc/gnus.texi (Directory Groups, Various Various):
* lisp/cedet/ede/base.el (ede-project):
* lisp/gnus/mml.el (mml-attach-external):
* lisp/org/org.el (org-file-apps):
* lisp/url/url-file.el (url-file-find-possibly-compressed-file):
Doc fixes; don't mention XEmacs specific library EFS.
2022-07-28 10:48:38 +02:00
Stefan Monnier
97441f742e * lisp/url/url-vars.el (url-mime-separator-chars): Fix last cosmetic change 2022-07-15 15:59:38 -04:00
Stefan Kangas
4e79f77635 Merge from origin/emacs-28
5e47ec9511 ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo.
ba0871bef1 ; Fix typos: prefer American spelling
e3e7f31faa Adapt Tramp doc

# Conflicts:
#	etc/NEWS
#	etc/themes/modus-themes.el
#	lisp/emacs-lisp/byte-opt.el
#	test/lisp/so-long-tests/spelling-tests.el
2022-07-14 11:37:42 +02:00
Stefan Kangas
5e47ec9511 ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo. 2022-07-13 13:11:46 +02:00
Stefan Kangas
2a8d083607 Drop support for the dead third-party w3 package
The w3 package was removed from GNU ELPA in 2020 as it doesn't run on
a recent Emacs, and development had stopped over a decade before that.
If anyone wants to revive the w3 package, they should look this all
over, but it doesn't make sense for us to maintain this support code.
Ref: https://debbugs.gnu.org/25395

* lisp/net/browse-url.el (browse-url-w3): Make obsolete.
(browse-url--browser-defcustom-type)
(browse-url-default-browser):
* lisp/ffap.el (ffap-url-at-point, ffap-file-at-point):
* lisp/net/newst-plainview.el (newsticker--buffer-do-insert-text):
* lisp/net/newst-reader.el (newsticker-html-renderer)
(newsticker-show-news):
* lisp/net/newst-treeview.el (newsticker--treeview-render-text):
* lisp/org/ol.el (org-store-link):
* lisp/url/url.el (url-retrieve): Remove w3 support code and related
documentation and comments.  (Bug#56435)

* test/lisp/net/browse-url-tests.el
(browse-url-tests-browser-kind): Adjust test for above changes.

* etc/TODO: Remove TODO to install W3.
* doc/misc/org.org (Handling Links): Don't mention W3.
* lisp/msb.el (msb--few-menus, msb--very-many-menus): Check for
eww-mode instead of w3-mode.
2022-07-09 17:27:49 +02:00
Stefan Kangas
9d866a1f8d Make some defcustom types more restrictive
* lisp/abbrev.el (abbrev-suggest-hint-threshold):
* lisp/bookmark.el (bookmark-bmenu-file-column)
(bookmark-menu-length):
* lisp/buff-menu.el (Buffer-menu-size-width)
(Buffer-menu-mode-width):
* lisp/calendar/calendar.el (calendar-week-start-day)
(calendar-intermonth-spacing, calendar-column-width)
(calendar-day-digit-width):
* lisp/calc/calc.el (calc-undo-length):
* lisp/calendar/timeclock.el (timeclock-workday):
* lisp/comint.el (comint-buffer-maximum-size)
(comint-input-ring-size):
* lisp/doc-view.el (doc-view-resolution, doc-view-image-width):
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-max-column):
* lisp/emacs-lisp/comp.el (native-comp-debug)
(native-comp-verbose, native-comp-async-jobs-number):
* lisp/emacs-lisp/package.el (package-name-column-width)
(package-version-column-width, package-status-column-width)
(package-archive-column-width):
* lisp/eshell/esh-mode.el (eshell-buffer-maximum-lines):
* lisp/frame.el (blink-cursor-blinks):
* lisp/info.el (Info-breadcrumbs-depth):
* lisp/jit-lock.el (jit-lock-chunk-size):
* lisp/kmacro.el (kmacro-ring-max):
* lisp/menu-bar.el (yank-menu-length, yank-menu-max-items):
* lisp/midnight.el (clean-buffer-list-delay-general)
(clean-buffer-list-delay-special):
* lisp/net/dictionary.el (dictionary-port)
(dictionary-proxy-port):
* lisp/net/ldap.el (ldap-default-port):
* lisp/net/pop3.el (pop3-port, pop3-stream-length):
* lisp/net/rcirc.el (rcirc-default-port):
* lisp/net/sieve-manage.el (sieve-manage-default-port):
* lisp/play/spook.el (spook-phrase-default-count):
* lisp/play/tetris.el (tetris-buffer-width)
(tetris-buffer-height, tetris-width, tetris-height)
(tetris-top-left-x, tetris-top-left-y):
* lisp/profiler.el (profiler-sampling-interval):
* lisp/progmodes/sql.el (sql-port):
* lisp/recentf.el (recentf-max-menu-items):
* lisp/strokes.el (strokes-grid-resolution):
* lisp/tab-bar.el (tab-bar-tab-name-truncated-max):
* lisp/term/xterm.el (xterm-max-cut-length):
* lisp/time.el (display-time-interval, world-clock-timer-second):
* lisp/url/url-cache.el (url-cache-expire-time):
* lisp/url/url-cookie.el (url-cookie-save-interval):
* lisp/url/url-history.el (url-history-save-interval):
* lisp/url/url-queue.el (url-queue-parallel-processes)
(url-queue-timeout):
* lisp/url/url-vars.el (url-max-password-attempts)
(url-max-redirections):
* lisp/vc/emerge.el (emerge-min-visible-lines):
* lisp/vc/vc.el (vc-log-show-limit):
* lisp/window.el (window-min-height, window-min-width):
* lisp/winner.el (winner-ring-size): Use :type natnum.

* lisp/savehist.el (savehist-file-modes): Fix setting to nil value and
use :type natnum.
2022-07-05 18:33:29 +02:00
Michael Albinus
c7f141d678 Make url-tramp-convert-tramp-to-url more robust
* lisp/url/url-tramp.el (url-tramp-convert-tramp-to-url):
Prevent errors from not existing Tramp methods.
2022-06-24 18:05:54 +02:00
Michael Albinus
8400c59358 Fix problems with Tramp FTP and URL handler mode
* lisp/net/tramp-archive.el (tramp-archive-run-real-handler):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Prevent invocation
of `tramp-archive-file-name-handler'.  (Bug#56078)

* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Make them more robust.
2022-06-20 12:47:27 +02:00
Lars Ingebrigtsen
98d454627c Rename generate-file to generate-lisp-file
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header)
(miscdic-convert):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Adjust callers.

* lisp/emacs-lisp/generate-lisp-file.el: Renamed from
generate-file.el.  Also rename some keyword parameters and require
a generator function.
2022-06-05 17:48:39 +02:00
Lars Ingebrigtsen
9d2f4a8d5a Add convenience functions for generating Emacs Lisp files
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric)

* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Use the new functions.

* lisp/emacs-lisp/generate-file.el: New file to provide
convenience functions for generated files.  It's not always
trivial to know which parts of the trailer that has to be
obfuscated to avoid not getting byte-compiled etc, and some parts
of the headers/trailers are usually forgotten when hand-coding
these.
2022-06-05 16:36:34 +02:00
Stefan Kangas
f437ddf2e9 Prefer defvar-keymap in url/*.el
* lisp/url/url-cookie.el (url-cookie-mode-map):
* lisp/url/url-dired.el (url-dired-minor-mode-map): Prefer
defvar-keymap.
2022-05-25 09:43:27 +02:00
Stefan Kangas
7749ec6aaa Remove some ancient Emacs compat code
* lisp/url/url-util.el (url-percentage): Remove Emacs 19 compat
code.

* lisp/erc/erc-backend.el (erc-server-coding-system):
* lisp/gnus/mm-util.el (mm-iso-8859-x-to-15-table): Remove Emacs
19 compat code; coding-system-p is fboundp.

* lisp/progmodes/cfengine.el (cfengine-fill-paragraph): Remove Emacs
21 compat code.
2022-05-25 09:42:52 +02:00
Lars Ingebrigtsen
d22bd210af Improve url-http debugging
* lisp/url/url-http.el (url-http-parse-headers): Output the
headers we receive in the debug output.
* lisp/url/url-vars.el (url-extensions-header): Remove useless header.
2022-05-12 14:07:45 +02:00
Lars Ingebrigtsen
bbf389ea6d Audit quoting the quote character in doc strings
* test/src/regex-emacs-tests.el (regex-tests-compare):
(regex-tests-compare):
(regex-tests-match):
* test/lisp/xml-tests.el (xml-parse-tests--qnames):
* test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from):
* test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset):
* test/lisp/calc/calc-tests.el (calc-tests-equal):
* lisp/window.el (get-lru-window):
(get-mru-window):
(get-largest-window):
(quit-restore-window):
(display-buffer):
* lisp/vc/vc-rcs.el (vc-rcs-consult-headers):
* lisp/url/url-auth.el (url-digest-auth-build-response):
* lisp/tutorial.el (tutorial--find-changed-keys):
* lisp/transient.el (transient-suffix-object):
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/textmodes/bibtex.el (bibtex-clean-entry):
* lisp/tab-bar.el (tab-bar--key-to-number):
(toggle-frame-tab-bar):
* lisp/ses.el (ses-recalculate-cell):
(ses-define-local-printer):
(ses-prin1):
* lisp/progmodes/xref.el (xref--find-ignores-arguments):
* lisp/progmodes/verilog-mode.el (verilog-single-declaration-end):
* lisp/progmodes/tcl.el (tcl-mode-hook):
* lisp/progmodes/gdb-mi.el (gdb-get-buffer-create):
* lisp/progmodes/elisp-mode.el (elisp--xref-make-xref):
* lisp/play/dunnet.el (dun-room-objects):
* lisp/outline.el (outline--cycle-state):
* lisp/org/ox-publish.el (org-publish-find-property):
* lisp/org/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org/org-table.el (org-table-collapse-header):
* lisp/org/org-plot.el (org--plot/prime-factors):
* lisp/org/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org/ob-lua.el (org-babel-lua-read-string):
* lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/org/ob-core.el (org-babel-default-header-args):
* lisp/obsolete/mouse-sel.el (mouse-select):
(mouse-select-secondary):
* lisp/net/tramp.el (tramp-methods):
* lisp/net/eww.el (eww-accept-content-types):
* lisp/net/dictionary-connection.el (dictionary-connection-status):
* lisp/minibuffer.el (completion-flex--make-flex-pattern):
* lisp/mh-e/mh-mime.el (mh-have-file-command):
* lisp/mh-e/mh-limit.el (mh-subject-to-sequence):
(mh-subject-to-sequence-threaded):
(mh-subject-to-sequence-unthreaded):
* lisp/mail/feedmail.el (feedmail-queue-buffer-file-name):
(feedmail-vm-mail-mode):
* lisp/ls-lisp.el (ls-lisp--sanitize-switches):
* lisp/keymap.el (key-valid-p):
* lisp/international/ccl.el (ccl-compile-branch-blocks):
* lisp/image/image-converter.el (image-convert):
* lisp/gnus/spam.el (spam-backend-check):
* lisp/gnus/nnselect.el (nnselect-generate-artlist):
* lisp/gnus/nnmairix.el (nnmairix-widget-other):
* lisp/gnus/message.el (message-mailto):
* lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article):
* lisp/gnus/gnus-search.el (gnus-search-prepare-query):
* lisp/frame.el (frame-size-history):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-dirs.el (eshell-expand-multiple-dots):
* lisp/erc/erc-backend.el (erc-bounds-of-word-at-point):
* lisp/emulation/cua-rect.el (cua--rectangle-operation):
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward):
* lisp/emacs-lisp/package.el (package-desc-suffix):
* lisp/emacs-lisp/faceup.el (faceup-test-explain):
* lisp/emacs-lisp/comp.el (comp-curr-allocation-class):
(comp-alloc-class-to-container):
(comp-add-cstrs):
(comp-remove-type-hints-func):
(batch-byte+native-compile):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/elec-pair.el (electric-pair--syntax-ppss):
* lisp/doc-view.el (doc-view-doc-type):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-alist):
(semantic-symref-hit-to-tag-via-db):
(semantic-symref-hit-to-tag-via-buffer):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function):
* lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions):
* lisp/cedet/semantic.el (semantic-working-type):
* lisp/cedet/ede/files.el (ede-flush-directory-hash):
* lisp/calc/calc.el (calc--header-line):
* lisp/auth-source.el (auth-source-pick-first-password):
(auth-source--decode-octal-string):
* etc/themes/modus-themes.el (modus-themes--paren):
(modus-themes--agenda-habit):
* admin/cus-test.el (cus-test-vars-with-changed-state): Fix
quoting in doc strings.  In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.
2022-04-22 16:17:22 +02:00
Nacho Barrientos
26faa2b943 Unify local variable initialisation in url-http
* lisp/url/url-http.el (url-http-chunked-last-crlf-missing): Treat
url-http-chunked-last-crlf-missing as any other buffer variable by
declaring and initialising it the same way as the other related
ones (bug#54989).

Copyright-paperwork-exempt: yes
2022-04-18 11:37:12 +02:00
Nacho Barrientos
0829c6836e Fix chunked encoding connections in url-http
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Ensure that chunked
encoding is interpreted correctly (bug#54989).

As per [0], the last chunk of 0 bytes is always accompanied by a last
CRLF that signals the end of the message:

     chunked-body   = *chunk
                      last-chunk
                      trailer-part
                      CRLF
                      ^ this one

     chunk          = chunk-size [ chunk-ext ] CRLF
                      chunk-data CRLF
     chunk-size     = 1*HEXDIG
     last-chunk     = 1*("0") [ chunk-ext ] CRLF

     chunk-data     = 1*OCTET ; a sequence of chunk-size octets

`url-http-chunked-encoding-after-change-function' is able to process
(and remove) that terminator IF AVAILABLE in the buffer when
processing the response, however it won't wait for it if it's not yet
there.

In other words:

| Bottom of the response buffer | Bottom of the full response |
|    (visible to url-http)      | (to be delivered to Emacs)  |
| ------------------------------+-----------------------------|
| 0\r\n                         | 0\r\n                       |
|                               | \r\n                        |

If the last chunk is processed when the bottom of the response buffer
is as above (note that the whole response has not yet been delivered
to Emacs), url-http will call the user callback without waiting for
the final terminator to be read from the socket.

This is normally not an issue when doing one-shot requests, but it's
problematic when the connection is reused immediately. As there are 2
bytes from the request N that have not been dealt with, they'll be
considered as part of the response of the request N+1. On top, it
turns out that when processing the headers of request N+1,
`url-http-wait-for-headers-change-function' will consider the request
a "headerless malformed response" delivering it broken to the caller.

The proposed fix implements a state in which
`url-http-chunked-encoding-after-change-function` properly waits for
the very last element of the message preventing the problem explained
above from happening.

For additional context, this bug was found when debugging
magit/ghub (see [1] for details).

[0] https://datatracker.ietf.org/doc/html/rfc7230#section-4.1
[1] https://github.com/magit/ghub/issues/81

Copyright-paperwork-exempt: yes
2022-04-17 13:00:12 +02:00
Lars Ingebrigtsen
37b11e5f16 Further IDNA/proxy url fixes
* lisp/url/url-http.el (url-http-create-request): Puny-encode
domains (bug#54921).
2022-04-16 17:02:01 +02:00
Lars Ingebrigtsen
346749f67d Handle non-ASCII domains correctly in url-https-proxy-connect
* lisp/url/url-http.el (url-https-proxy-connect)
(url-https-proxy-after-change-function): Handle IDNA domains
correctly.
2022-04-14 18:08:00 +02:00