Commit graph

4859 commits

Author SHA1 Message Date
Michael Albinus
1d3fe25690 Tramp code cleanup
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Use it.

* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.

* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name):
Fix root filename for cache.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.

* lisp/net/tramp-sh.el (tramp-open-shell): Add sanity check for
shell prompt.
(tramp-get-ls-command): Check, that argument "--color=never" has
the intended effect.
2022-08-14 17:01:25 +02:00
Ulf Jasper
f7438fc859 newsticker: fix bug#57045
* lisp/net/newst-treeview.el
(newsticker--treeview-list-items-with-age) (newsticker-treeview-update):
Fix issues with changing sort order in virtual feed 'all' (Bug#57045).
2022-08-11 13:34:18 +02:00
Michael Albinus
80837653eb ; Fix typo in tramp-archive.el
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Fix typo.  (Bug#57130)
2022-08-11 08:41:11 +02:00
Stefan Kangas
32d8fc999c Avoid using aliases for color functions
* lisp/emulation/viper-init.el (viper-has-face-support-p):
* lisp/emulation/viper-util.el (viper-save-cursor-color)
(viper-change-cursor-color):
* lisp/faces.el (read-color):
* lisp/net/dictionary.el (dictionary-color-support):
* lisp/obsolete/gs.el (gs-set-ghostview-colors-window-prop):
* lisp/progmodes/cperl-mode.el (cperl-choose-color):
* lisp/woman.el (woman-fontify): Avoid using aliases for
color-defined-p, display-color-p, and color-values.
2022-08-09 22:28:08 +02:00
Stefan Kangas
581fa3d958 Autoload string-blank-p
* lisp/eshell/em-hist.el (subr-x):
* lisp/net/eudc.el (subr-x): Don't require.
* lisp/emacs-lisp/subr-x.el (string-blank-p): Autoload.
2022-08-09 21:58:00 +02:00
Michael Albinus
b0653b27e2 Further Tramp fixes for Android 12
* lisp/net/tramp-adb.el (tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Pipe "ls" output
through "cat", in order to avoid quoting special characters.
(tramp-adb-sh-fix-ls-output): Remove fix for file names with spaces.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
2022-08-09 18:12:27 +02:00
Michael Albinus
82d22ef8db Improve Tramp error message
* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Simplify for empty files.  Better error message.  (Bug#56879)
2022-08-07 16:35:50 +02:00
Michael Albinus
b9c65203d0 Adapt Tramp for Android 12
* lisp/net/tramp-adb.el (tramp-methods): Use "%d".
(tramp-adb-handle-directory-files-and-attributes): Fix "." and
".." in listing.
(tramp-adb-sh-fix-ls-output): Fix file names with spaces.
(tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Check for adb device if indicated.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp-test22-file-times): Adapt tests.
2022-08-06 18:09:35 +02:00
Jim Porter
d7b89ea407 Allow creating processes where only one of stdin or stdout is a PTY
* src/lisp.h (emacs_spawn):
* src/callproc.c (emacs_spawn): Add PTY_IN and PTY_OUT arguments to
specify which streams should be set up as a PTY.
(call_process): Adjust call to 'emacs_spawn'.

* src/process.h (Lisp_Process): Replace 'pty_flag' with 'pty_in' and
'pty_out'.

* src/process.c (is_pty_from_symbol): New function.
(make-process): Allow :connection-type to be a cons cell, and allow
using a stderr process with a PTY for stdin/stdout.
(create_process): Handle creating a process where only one of stdin or
stdout is a PTY.

* lisp/eshell/esh-proc.el (eshell-needs-pipe, eshell-needs-pipe-p):
Remove.
(eshell-gather-process-output): Use 'make-process' and set
':connection-type' as needed by the value of 'eshell-in-pipeline-p'.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't signal an
error when ':connection-type' is a cons cell.

* test/src/process-tests.el
(process-test-sentinel-wait-function-working-p): Allow passing PROC
in, and rework into...
(process-test-wait-for-sentinel): ... this.
(process-test-sentinel-accept-process-output)
(process-test-sentinel-sit-for, process-test-quoted-batfile)
(process-test-stderr-filter): Use 'process-test-wait-for-sentinel'.
(make/process/test-connection-type): New function.
(make-process/connection-type/pty, make-process/connection-type/pty-2)
(make-process/connection-type/pipe)
(make-process/connection-type/pipe-2)
(make-process/connection-type/in-pty)
(make-process/connection-type/out-pty)
(make-process/connection-type/pty-with-stderr-buffer)
(make-process/connection-type/out-pty-with-stderr-buffer): New tests.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test--detect-pty-cmd):
New variable.
(esh-proc-test/pipeline-connection-type/no-pipeline)
(esh-proc-test/pipeline-connection-type/first)
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): New tests.

* doc/lispref/processes.texi (Asynchronous Processes): Document new
':connection-type' behavior.
(Output from Processes): Remove caveat about ':stderr' forcing
'make-process' to use pipes.

* etc/NEWS: Announce this change (bug#56025).
2022-08-05 17:58:54 -07:00
Stefan Kangas
b7a896731c Make ange-ftp-re-read-dir compat alias obsolete
* lisp/net/ange-ftp.el (ange-ftp-re-read-dir): Make alias obsolete.
Update callers.
2022-08-05 14:00:23 +02:00
Michael Albinus
a08dd087e9 Adapt Tramp for backward compatibility
* lisp/net/tramp-compat.el (tramp-compat-auth-source-netrc-parse-all):
New defalias.

* lisp/net/tramp.el (tramp-parse-netrc): Use it.  (Bug#56976)
2022-08-04 19:27:49 +02:00
Michael Albinus
e3edbf577b Fix last Tramp change, especially for bug#56963
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
Add missing space.

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Use "cat",
"echo -n" isn't portable.  (Bug#56963)

* lisp/net/tramp.el (tramp-file-name-unify): Unquote file name in time.
2022-08-04 18:12:25 +02:00
Lars Ingebrigtsen
4483de6a4c Move netrc.el to lisp/obsolete/ 2022-08-04 17:12:05 +02:00
Lars Ingebrigtsen
3bc7b5f412 Use auth-source in tramp-parse-netrc
* lisp/auth-source.el (auth-source-netrc-parse-all): Autoload.

* lisp/net/tramp.el (tramp-parse-netrc): Don't use netrc-parse,
because it's going to be made obsolete (bug#56976).
2022-08-04 17:09:46 +02:00
Philip Kaludercic
24e93505b9 * eww.el (eww-browse): Raise error if there are no arguments 2022-08-04 14:20:58 +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
Lars Ingebrigtsen
3ec2fdc9a1 Fix eww--download-directory naming
* lisp/net/eww.el (eww--download-directory):
(eww-download-directory): Rename function that was mistakenly
named "erc--"   (bug#56969).
2022-08-04 11:04:51 +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
Michael Albinus
21afc26d4d Reorganize Tramp
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Handle special
case that START is "".
(tramp-adb-handle-set-file-modes)
(tramp-adb-handle-set-file-times):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.
(tramp-adb-handle-make-process):
Use `with-tramp-saved-connection-properties'.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Use `tramp-archive-handle-file-exists-p'.
(tramp-archive-handle-file-exists-p): New defun.
(tramp-archive-file-name-handler): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-cache.el (tramp-compat, tramp-loaddefs)
(time-stamp): Require.
(tramp-get-file-property, tramp-set-file-property)
(tramp-flush-file-property, tramp-flush-file-upper-properties)
(tramp-flush-file-properties): Use `tramp-file-name-unify'.  Adapt
message.
(tramp-flush-directory-properties): Simplify.
(tramp-flush-file-function): Add ;;;###tramp-autoload cookie.
Don't use `with-parsed-tramp-file-name', it isn't exposed.
(with-tramp-file-property, with-tramp-connection-property)
(with-tramp-saved-connection-property): Macros moved from tramp.el.
(with-tramp-saved-file-property)
(with-tramp-saved-file-properties)
(with-tramp-saved-connection-properties): New defmacros.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush "/".

* lisp/net/tramp-crypt.el (tramp-crypt-handle-set-file-modes)
(tramp-crypt-handle-set-file-times)
(tramp-crypt-handle-set-file-uid-gid):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.

* lisp/net/tramp-ftp.el (tramp-archive-file-name-handler):
Don't declare.

* lisp/net/tramp-gvfs.el (tramp-gvfs-info): New defun.
(tramp-gvfs-do-copy-or-rename-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file, tramp-gvfs-get-root-attributes)
(tramp-gvfs-handle-make-directory): Use it.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-gvfs-handle-set-file-uid-gid):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
Expand TARGET when flushing file properties.
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-set-file-uid-gid):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.
(tramp-sh-handle-file-name-all-completions): Protect, when
connection is not established yet.
(tramp-do-copy-or-rename-file-directly): Flush file properties of
NEWNAME when constructing a new remote file name.
(tramp-do-copy-or-rename-file-out-of-band, tramp-sh-handle-make-process):
Use `with-tramp-saved-connection-properties'.
(tramp-sh-handle-delete-file): Flush file properties only after
deleting, otherwise we get a false alarm.
(tramp-sh-handle-process-file): Flush "/".
(tramp-sh-handle-write-region): Handle special case that START is "".

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process):
Use `with-tramp-saved-connection-properties'.
(tramp-smb-remote-acl-p): New defun.
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl): Use it.
(tramp-smb-handle-set-file-modes):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.
(tramp-smb-handle-process-file, tramp-smb-maybe-open-connection):
Flush "/".

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Flush "/".
(tramp-sshfs-handle-set-file-modes)
(tramp-sshfs-handle-set-file-times):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes)
(tramp-sudoedit-handle-set-file-times)
(tramp-sudoedit-handle-set-file-uid-gid):
Use `tramp-skeleton-set-file-modes-times-uid-gid'.

* lisp/net/tramp.el (tramp-archive-file-name-handler): Don't declare.
(tramp-verbose, tramp-file-name-unify, tramp-tramp-file-p)
(tramp-file-local-name, tramp-dissect-file-name)
(tramp-make-tramp-file-name, tramp-get-connection-buffer)
(tramp-get-buffer-string, tramp-debug-message)
(tramp-inhibit-progress-reporter, tramp-message):
Add ;;;###tramp-autoload cookie.
(tramp-file-name): Expose defstruct to tramp-loaddefs.el
(tramp-file-name-unify): New optional arg FILE.
(tramp-get-default-directory, tramp-get-buffer-string)
(tramp-message, tramp-backtrace, tramp-error-with-buffer)
(tramp-with-demoted-errors, tramp-barf-if-file-missing)
(tramp-skeleton-copy-directory, tramp-skeleton-delete-directory)
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-file-local-copy, tramp-skeleton-write-region):
Remove `tramp-suppress-trace' property, it isn't needed for
defmacros and defsubsts.
(with-tramp-file-property, with-tramp-connection-property)
(with-tramp-saved-connection-property): Move macros to tramp-cache.el.
(tramp-skeleton-directory-files-and-attributes): Fix implementation.
(tramp-skeleton-file-local-copy): Fix docstring.
(tramp-skeleton-set-file-modes-times-uid-gid): New defmacro.
(tramp-skeleton-write-region): Set "file-exists-p" cache property.
(tramp-handle-file-exists-p): Use cached value.
(tramp-process-sentinel): Flush "/".
(tramp-make-tramp-temp-file): Suppress also `tramp-smb-remote-acl-p'.
(tramp-get-connection-buffer):

* test/lisp/net/tramp-tests.el (tramp-test10-write-region)
(tramp-test20-file-modes, tramp-test22-file-times): Extend tests.
2022-08-03 17:30:09 +02:00
Stefan Kangas
165675797e Use string-trim in newsticker--remove-whitespace
* lisp/net/newst-backend.el (newsticker--remove-whitespace): Use
string-trim.
2022-08-03 11:48:45 +02:00
Stefan Kangas
7c8bd8802b * lisp/net/dig.el: Improve Commentary. 2022-08-01 13:32:34 +02:00
Stefan Kangas
b9b5657c56 Doc fix in eudc-hotlist.el
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode): Doc fix; use command
substitution.
2022-08-01 13:32:34 +02:00
Stefan Kangas
66c23da444 Fix namespacing issue in dig.el
* lisp/net/dig.el (dig-query): Rename from 'query-dig'.
(query-dig): Make into obsolete function alias for 'dig-query'.
2022-08-01 13:32:34 +02:00
Stefan Kangas
89fbcbb907 ; * lisp/net/net-utils.el: Delete code commented out since 2000.
Note also that the netstat command is officially deprecated.
2022-08-01 11:52:32 +02:00
Paul Eggert
2cd204d8bb Prefer ‘time-equal-p’ to ‘equal’ on timestamps
This is more robust since timestamps can have multiple forms.
* lisp/auth-source.el (auth-source-netrc-parse):
* lisp/bookmark.el (bookmark--watch-file-already-queried-p)
(bookmark-maybe-load-default-file):
* lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p):
* lisp/dired.el (dired-directory-changed-p):
* lisp/files.el (dir-locals-find-file):
* lisp/gnus/gnus-util.el (gnus-cache-file-contents):
* lisp/gnus/nneething.el (nneething-create-mapping):
* lisp/gnus/nnfolder.el (nnfolder-read-folder):
* lisp/gnus/nnmaildir.el (nnmaildir--update-nov)
(nnmaildir--scan, nnmaildir-request-scan)
(nnmaildir-request-update-info):
* lisp/gnus/nnmh.el (nnmh-update-gnus-unreads):
* lisp/gnus/spam-stat.el (spam-stat-load):
* lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases):
* lisp/mail/sendmail.el (sendmail-sync-aliases):
* lisp/net/netrc.el (netrc-parse):
* lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
* lisp/play/cookie1.el (cookie-snarf):
* lisp/vc/vc-cvs.el (vc-cvs-state-heuristic):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p)
(vc-hg--cached-dirstate-search):
* lisp/vc/vc-hooks.el (vc-after-save):
Prefer ‘time-equal-p’ to ‘equal’ when comparing
timestamps for equality.
2022-08-01 01:17:17 -07:00
Michael Albinus
66e01c9608 Declare Tramp function for backward compatibility
* lisp/net/tramp.el (tramp-archive-file-name-handler):
* lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Declare.
2022-07-31 15:45:34 +02:00
Philip Kaludercic
df8dede858 Fix electric paring in rcirc buffers
* rcirc.el (rcirc--electric-pair-inhibit): Add new predicate function.
(rcirc-mode): Use rcirc--electric-pair-inhibit.
2022-07-31 12:47:11 +02:00
Lars Ingebrigtsen
623356ee94 Fix compilation warnings in tramp-loaddefs.el
* lisp/files.el (file-name-quoted-p): Autoload because it's
referred to from tramp-loaddefs.
* lisp/net/tramp.el (defvar): Put the entire form into the
loaddefs file instead of eval-and-compile -- this fixes a
dependency problem when byte-compiling the loaddefs file.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-default-host-alist)
(tramp-local-host-regexp, tramp-terminal-type)
(tramp-foreign-file-name-handler-alist): Autoload to avoid
compilation warnings.  Also put (require 'cl-lib) into the
loaddefs file for the same reason.
(tramp-ensure-dissected-file-name)
(tramp-set-completion-function)
(tramp-register-foreign-file-name-handler): Autoload.
2022-07-31 12:01:10 +02:00
Lars Ingebrigtsen
0a0e1ed0e0 tramp fixes for byte-compiling loaddefs.el
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Move to the main loaddefs file since it's referred to by functions
there.
* lisp/net/tramp.el (tramp-file-name-handler): Autoload to avoid
warning when byte-compiling loaddefs.el.
2022-07-31 11:24:23 +02:00
Stefan Kangas
73465fe481 Make net/quickurl.el obsolete (part 1/2)
* lisp/net/quickurl.el: Move from here...
* lisp/obsolete/quickurl.el: ...to here.
2022-07-28 12:47:54 +02:00
Stefan Kangas
fcaad99053 Drop support for XEmacs package EFS
EFS is a long defunct XEmacs-specific fork of Ange FTP that is
superseded by TRAMP.
* lisp/ffap.el (ffap-ftp-default-user)
(ffap-replace-file-component, ffap-host-to-filename):
* lisp/gnus/mml.el (mml-parse-file-name):
* lisp/gnus/nnheader.el (nnheader-re-read-dir):
* lisp/net/browse-url.el (browse-url-filename-alist):
* lisp/speedbar.el (speedbar-check-vc): Drop support for XEmacs
package EFS.
2022-07-28 00:11:12 +02:00
Michael Albinus
00897b6369 Remove Tramp instrumentation 2022-07-27 21:20:49 +02:00
Michael Albinus
4a1c7a90ed * lisp/net/tramp.el (tramp-handle-shell-command): Modify sentinel handling. 2022-07-27 19:55:18 +02:00
Michael Albinus
cc6aebc85e Further Tramp instrumentation
; * test/infra/test-jobs.yml (test-lisp-net-inotify):
; Revert instrumentation.
2022-07-27 15:22:08 +02:00
Michael Albinus
db4dd28c21 In Tramp, use string-empty-p' and string-equal-ignore-case' consequently
* lisp/net/tramp.el (tramp-find-method):
* lisp/net/tramp-cmds.el (tramp-change-syntax):
* lisp/net/tramp-sh.el (tramp-sh-get-signal-strings)
(tramp-open-connection-setup-interactive-shell): Use `string-empty-p'.

* lisp/net/tramp-compat.el (tramp-compat-string-equal-ignore-case):
New defalias.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted): Use it.
2022-07-27 12:51:11 +02:00
Sam Steingold
70341cab3e string-equal-ignore-case: new function
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
  Add `string-equal-ignore-case'.
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'.
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise.
* lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'.
* lisp/files.el (file-truename): Use `string-equal-ignore-case'.
(file-relative-name): Likewise.
* lisp/gnus/gnus-art.el (article-hide-boring-headers):
  Use `string-equal-ignore-case' instead of `gnus-string-equal'.
* lisp/gnus/gnus-util.el (gnus-string-equal):
  Remove, use `string-equal-ignore-case' instead.
* lisp/international/mule-cmds.el (describe-language-environment):
  Use `string-equal-ignore-case'.
(locale-charset-match-p): Likewise.
* lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'.
* lisp/minibuffer.el (completion--string-equal-p):
  Remove, use `string-equal-ignore-case' instead.
(completion--twq-all): Use `string-equal-ignore-case'.
(completion--do-completion): Likewise.
* lisp/net/browse-url.el (browse-url-default-windows-browser):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/org/ob-core.el (org-babel-results-keyword):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(org-babel-insert-result): Likewise.
* lisp/org/org-compat.el (string-equal-ignore-case):
  Define unless defined already.
(org-mode-flyspell-verify): Use `string-equal-ignore-case'.
* lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise.
* lisp/org/ox.el (org-export-resolve-radio-link): Use
  `string-equal-ignore-case' and `string-clean-whitespace'.
* lisp/progmodes/flymake-proc.el
  (flymake-proc--check-patch-master-file-buffer):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
* lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'.
(string-equal-ignore-case): Compare strings ignoring case.
* lisp/textmodes/bibtex.el (bibtex-string=): Remove.
(bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry)
(bibtex-print-help-message, bibtex-validate, bibtex-validate-globally)
(bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url):
  Use `string-equal-ignore-case' instead of `bibtex-string='.
* lisp/textmodes/sgml-mode.el (sgml-get-context):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(sgml-calculate-indent): Likewise
* test/lisp/subr-tests.el (string-comparison-test):
  Add tests for `string-equal-ignore-case'.
2022-07-26 13:49:28 -04:00
Michael Albinus
dfa16cadc1 Fix regression in last Tramp change
* lisp/net/tramp-sh.el (tramp-readlink-file-truename): Remove.
(tramp-sh-handle-file-truename): Revert implementation.  (Bug#56774)
2022-07-26 14:10:50 +02:00
Michael Albinus
9ed5c39aad Refactor Tramp
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-adb-handle-get-remote-gid' and
`tramp-adb-handle-get-remote-uid'.
(tramp-adb-handle-file-attributes): Use `tramp-convert-file-attributes'.
(tramp-do-parse-file-attributes-with-ls): Remove ID-FORMAT.
(tramp-adb-handle-directory-files-and-attributes):
Use `tramp-skeleton-directory-files-and-attributes'.
(tramp-adb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-adb-handle-get-remote-uid)
(tramp-adb-handle-get-remote-gid): New defuns.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Use `tramp-archive-handle-directory-files'.
(tramp-archive-handle-directory-files): New defun.

* lisp/net/tramp-cache.el (tramp-file-property-p): New defun.

* lisp/net/tramp-compat.el (tramp-compat-take): New defalias.

* lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-crypt-handle-directory-files):
Use `tramp-skeleton-directory-files'.

* lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files):
Use `tramp-skeleton-directory-files'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.

* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.

* lisp/net/tramp-sh.el (tramp-readlink-file-truename)
(tramp-stat-file-attributes)
(tramp-stat-directory-files-and-attributes): New defconsts.
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes): Adapt.
(tramp-sh-handle-make-symbolic-link): Flush TARGET file properties.
(tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename'
(tramp-sh-handle-file-exists-p)
(tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p): Adapt check of file properties.
(tramp-sh-handle-file-attributes): Simplify.
(tramp-do-file-attributes-with-ls): Remove ID-FORMAT.  Combine two
remote commands.  Compute both versions of uid and gid together.
(tramp-do-file-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-perl):
Remove ID-FORMAT.
(tramp-do-file-attributes-with-stat): Remove ID-FORMAT.  Use
`tramp-stat-file-attributes'.
(tramp-sh-handle-directory-files-and-attributes):
Use `tramp-skeleton-directory-files-and-attributes'.
(tramp-do-directory-files-and-attributes-with-stat):
Remove ID-FORMAT.  Use `tramp-stat-directory-files-and-attributes'.
(tramp-sh-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'.
(tramp-sh-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-sh-handle-write-region): Combine two remote commands.
(tramp-sh-gio-monitor-process-filter): Simplify `cond' call.
(tramp-expand-script): Extend for ls, readling and stat.
(tramp-open-connection-setup-interactive-shell): Do not set
`tramp-end-of-output'.
(tramp-open-connection-setup-interactive-shell): Do not send
prompt formatting command, it's superfluous.
(tramp-send-command-and-check): Rearrange in order to accept also
heredoc scripts.
(tramp-convert-file-attributes): Move function to tramp.el.
(tramp-get-remote-id): Set connection property.
(tramp-get-remote-uid-with-id): Use it.
(tramp-get-remote-python): Don't check for python2 anymore.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-directory-files'.
(tramp-smb-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-smb-handle-directory-files): Remove.
(tramp-smb-handle-file-attributes): Use `tramp-convert-file-attributes'.
(tramp-smb-do-file-attributes-with-stat): Remove ID-FORMAT.
(tramp-smb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-sudoedit-file-attributes): New defconst.
(tramp-sudoedit-handle-file-attributes): Simplify code.

* lisp/net/tramp.el (tramp-setup-debug-buffer): Set debug buffer
as not modified.
(tramp-barf-if-file-missing, tramp-skeleton-copy-directory)
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-file-local-copy): New macros.
(tramp-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-handle-directory-files): Use `tramp-skeleton-directory-files'.
(tramp-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-handle-insert-file-contents): Use `tramp-barf-if-file-missing'.
(tramp-get-process-attributes, tramp-action-out-of-band):
Simplify `cond' call.
(tramp-check-cached-permissions): Simplify.
(tramp-make-tramp-temp-file): Reimplement.

* test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit):
Don't set.

* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Remove superfluous test files.
(tramp-test21-file-links): Protect file name deletion.
2022-07-24 16:02:10 +02:00
Stefan Kangas
a463dccdd0 Merge from origin/emacs-28
b4067394dc Set `default-directory' of Tramp archive connection buffer
2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo.
54c4ceb009 Update the documentation of 'declare' forms
7263631dca Fix bookmark support for Help functions in native-compilat...

# Conflicts:
#	lisp/help.el
2022-07-24 09:55:01 +02:00
Michael Albinus
b4067394dc Set `default-directory' of Tramp archive connection buffer
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Set `default-directory' of Tramp connection buffer.  (Bug#56628)
2022-07-23 19:45:24 +02:00
Lars Ingebrigtsen
e00f882905 Don't bug out in src when there's no srcset
* lisp/net/shr.el (shr--preferred-image): Don't bug out when
there's no srcset.
2022-07-23 07:46:52 +02:00
Lars Ingebrigtsen
2ebede7d75 Fix srcset parsing in shr
* lisp/net/shr.el (shr--preferred-image): Factor out srcset
parsing for easier testing.
(shr--parse-srcset): Don't misparse URLs with commas in them.
2022-07-23 07:43:45 +02:00
Stefan Kangas
df508ffd2b Merge from origin/emacs-28
ae1ace1cf4 Adjust help-fns.el tests for recent change
04bdcf4aaa * src/terminal.c (Fframe_terminal): Use active voice
7fa491a9e9 Improve 'terminal-live-p' docstring some more
b9ac8c29ae Improve terminal-live-p docstring
0b4c81a152 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): F...
8f8373170f * lisp/progmodes/cperl-mode.el: Don't mention obsolete arc...
25bc330a6d Make 'describe-function' say "byte-compiled" when appropriate
2b31e667be ;Improve documentation of locale-specific string comparison
2022-07-23 01:37:59 +02:00
Robert Pluim
0b4c81a152 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Fix grammar 2022-07-22 10:11:21 +02:00
Stefan Kangas
204d9f976d Make dictionary-help obsolete in favor of describe-mode
* lisp/net/dictionary.el (dictionary-help): Make obsolete in favor
of describe-mode.  Update uses.
2022-07-21 09:23:20 +02:00
Stefan Kangas
329ec11b0f ; Normalize some "Author" headers 2022-07-20 22:38:01 +02:00
Stefan Kangas
bbac84ac9b Merge from origin/emacs-28
cb911febc6 ; Fix typos

# Conflicts:
#	test/lisp/net/tramp-tests.el
2022-07-20 10:30:41 +02:00
Eli Zaretskii
29bf19df09 ; Fix punctuation in recently changed EUDC documentation
* lisp/net/eudcb-macos-contacts.el (eudc-macos-contacts-search-helper):
* lisp/net/eudc-vars.el (eudc-inline-expansion-format):
* etc/NEWS: Fix punctuation in recent EUDC changes.
2022-07-19 16:42:43 +03:00
Stefan Kangas
cb911febc6 ; Fix typos 2022-07-19 14:13:25 +02:00
Stefan Kangas
4b807380cf Merge from origin/emacs-28
282dde887d ; Fix typo missed in previous change
62c47ffd5f ; * lisp/net/tramp-crypt.el: Improve commentary
cba30431ff Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e...
8f9993bb3f ; * src/buffer.c (syms_of_buffer) <mode-line-format>: Doc ...
fec4bb89f9 ; Fix typos (Bug#56550)
2022-07-19 06:30:56 +02:00