1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-26 19:18:50 +00:00
Commit Graph

149332 Commits

Author SHA1 Message Date
Mattias Engdegård
051434fdef Use string-replace instead of replace-regexp-in-string
`string-replace` is easier to understand, less error-prone, much
faster, and results in shorter Lisp and byte code.  Use it where
applicable and obviously safe (erring on the conservative side).

* admin/authors.el (authors-scan-change-log):
* lisp/autoinsert.el (auto-insert-alist):
* lisp/calc/calc-prog.el (calc-edit-macro-combine-alg-ent)
(calc-edit-macro-combine-ext-command)
(calc-edit-macro-combine-var-name):
* lisp/calc/calc-units.el (math-make-unit-string):
* lisp/calendar/cal-html.el (cal-html-comment):
* lisp/calendar/cal-tex.el (cal-tex-comment):
* lisp/calendar/icalendar.el (icalendar--convert-string-for-export)
(icalendar--convert-string-for-import):
* lisp/calendar/iso8601.el (iso8601--concat-regexps)
(iso8601--full-time-match, iso8601--combined-match):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/todo-mode.el (todo-filter-items-filename):
* lisp/cedet/cedet-files.el (cedet-directory-name-to-file-name)
(cedet-file-name-to-directory-name):
* lisp/comint.el (comint-watch-for-password-prompt):
* lisp/dired-aux.el (dired-do-chmod):
* lisp/dired-x.el (dired-man):
* lisp/dired.el (dired-insert-directory, dired-goto-file-1):
* lisp/emacs-lisp/comp.el (comp-c-func-name):
* lisp/emacs-lisp/re-builder.el (reb-copy):
* lisp/erc/erc-dcc.el (erc-dcc-unquote-filename):
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy)
(erc-update-mode-line-buffer, erc-message-english-PART):
* lisp/files.el (make-backup-file-name-1, files--transform-file-name)
(read-file-modes):
* lisp/fringe.el (fringe-mode):
* lisp/gnus/gnus-art.el (gnus-button-handle-info-url):
* lisp/gnus/gnus-group.el (gnus-group-completing-read):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date)
(gnus-search-transform-expression, gnus-search-run-search):
* lisp/gnus/gnus-start.el (gnus-dribble-enter):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-mode-string-quote):
* lisp/gnus/message.el (message-put-addresses-in-ecomplete)
(message-parse-mailto-url, message-mailto-1):
* lisp/gnus/mml-sec.el (mml-secure-epg-sign):
* lisp/gnus/mml-smime.el (mml-smime-epg-verify):
* lisp/gnus/mml2015.el (mml2015-epg-verify):
* lisp/gnus/nnmaildir.el (nnmaildir--system-name)
(nnmaildir-request-list, nnmaildir-retrieve-groups)
(nnmaildir-request-group, nnmaildir-retrieve-headers):
* lisp/gnus/nnrss.el (nnrss-node-text):
* lisp/gnus/spam-report.el (spam-report-gmane-internal)
(spam-report-user-mail-address):
* lisp/ibuffer.el (name):
* lisp/image-dired.el (image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-create-thumb-1):
* lisp/info.el (Info-set-mode-line):
* lisp/international/mule-cmds.el (describe-language-environment):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rfc2368.el (rfc2368-parse-mailto-url):
* lisp/mail/rmail.el (rmail-insert-inbox-text)
(rmail-simplified-subject-regexp):
* lisp/mail/rmailout.el (rmail-output-body-to-file):
* lisp/mail/undigest.el (rmail-digest-rfc1153):
* lisp/man.el (Man-default-man-entry):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc--debug):
* lisp/net/browse-url.el (browse-url-mail):
* lisp/net/eww.el (eww-update-header-line-format):
* lisp/net/newst-backend.el (newsticker-save-item):
* lisp/net/rcirc.el (rcirc-sentinel):
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/nxml/rng-cmpct.el (rng-c-literal-2-re):
* lisp/nxml/xmltok.el (let*):
* lisp/obsolete/nnir.el (nnir-run-swish-e, nnir-run-hyrex)
(nnir-run-find-grep):
* lisp/play/dunnet.el (dun-doassign):
* lisp/play/handwrite.el (handwrite):
* lisp/proced.el (proced-format-args):
* lisp/profiler.el (profiler-report-header-line-format):
* lisp/progmodes/gdb-mi.el (gdb-mi-quote):
* lisp/progmodes/make-mode.el (makefile-bsdmake-rule-action-regex)
(makefile-make-font-lock-keywords):
* lisp/progmodes/prolog.el (prolog-guess-fill-prefix):
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
* lisp/progmodes/sql.el (sql-remove-tabs-filter, sql-str-literal):
* lisp/progmodes/which-func.el (which-func-current):
* lisp/replace.el (query-replace-read-from)
(occur-engine, replace-quote):
* lisp/select.el (xselect--encode-string):
* lisp/ses.el (ses-export-tab):
* lisp/subr.el (shell-quote-argument):
* lisp/term/pc-win.el (msdos-show-help):
* lisp/term/w32-win.el (w32--set-selection):
* lisp/term/xterm.el (gui-backend-set-selection):
* lisp/textmodes/picture.el (picture-tab-search):
* lisp/thumbs.el (thumbs-call-setroot-command):
* lisp/tooltip.el (tooltip-show-help-non-mode):
* lisp/transient.el (transient-format-key):
* lisp/url/url-mailto.el (url-mailto):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p):
* lisp/vc/vc-bzr.el (vc-bzr-status):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* lisp/vc/vc-svn.el (vc-svn-after-dir-status):
* lisp/xdg.el (xdg-desktop-strings):
* test/lisp/electric-tests.el (defun):
* test/lisp/term-tests.el (term-simple-lines):
* test/lisp/time-stamp-tests.el (formatz-mod-del-colons):
* test/lisp/wdired-tests.el (wdired-test-bug32173-01)
(wdired-test-unfinished-edit-01):
* test/src/json-tests.el (json-parse-with-custom-null-and-false-objects):
Use `string-replace` instead of `replace-regexp-in-string`.
2021-08-08 19:25:26 +02:00
Eli Zaretskii
1cae6b9aab Another fix for parse-colon-path
* test/lisp/files-tests.el (files-tests-bug-21454, files-colon-path):
Adapt to change in behavior of 'parse-colon-path'.

* lisp/files.el (parse-colon-path): Don't expand the directory
names: that changes the names in ways this function is not
supposed to.  (Bug#49918)
2021-08-08 17:29:56 +03:00
Michael Albinus
fd2d56d63c Doc update wrt Tramp support of SSH security keys
* doc/misc/tramp.texi (Frequently Asked Questions): Speak about
SSH security keys.
(GVFS-based methods, Predefined connection information)
(Remote shell setup): Fix typo.

* etc/NEWS: Precise Tramp's support for SSH security keys.  Fix typos.
2021-08-08 16:18:59 +02:00
Michael Albinus
99c535111b Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-08-08 16:18:10 +02:00
Dmitry Gutov
3b32d057ff project.el: Bump the version
* lisp/progmodes/project.el: Bump the version.
2021-08-08 14:13:49 +03:00
Michael Albinus
e763c8947a Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-08-08 12:39:11 +02:00
Eric Abrahamsen
adab672edb Further fix to filtering Gnus search group names
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Group
names in the GROUPS argument may be prefixed or not, depending on
which server we're searching, so always enforce prefix policy within
the function.
2021-08-07 08:21:26 -07:00
Eli Zaretskii
85c8a9cd0c Fix files-tests broken on MS-Windows by a recent change
* test/lisp/files-tests.el (files-colon-path): Use path-separator, and
account for drive letters in absolute file names on MS-Windows.  (Bug#49918)
2021-08-07 14:29:45 +03:00
Lars Ingebrigtsen
e1ce9904aa Fix prin1 problem in package-quickstart-refresh
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Bind
print-length/print-level before using prin1-to-string (bug#49924).
2021-08-07 13:02:01 +02:00
Lars Ingebrigtsen
bc1ffc5f6e Fix print-length issue in comp-run-async-workers
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind
print-length/print-level to ensure there's no truncation (bug#49922).
2021-08-07 12:59:22 +02:00
Lars Ingebrigtsen
6a3920c07e Make q' in org-agenda' work even with `debug-on-error' set
* lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
Using `error' here will trigger users with `debug-on-error' so use
`user-error' instead (bug#49920).  It would probably be preferable
to rewrite this to not use the error system to do control flow.
2021-08-07 12:55:39 +02:00
Lars Ingebrigtsen
9a6fc63843 Fix problem with relative directories in CDPATH
* lisp/files.el (parse-colon-path): Allow relative directories
(like ".") in CDPATH (bug#49918).
2021-08-07 12:50:56 +02:00
Tomasz Konojacki
c62e805d80 perl-mode: fix variable fontification
* lisp/progmodes/perl-mode.el: Handle variables first to avoid
conflicting with keywords. This fixes cases like "$package"
(bug#49906).
Copyright-paperwork-exempt: yes
2021-08-07 12:37:47 +02:00
Mattias Engdegård
b8e3b0f157 ; * lisp/replace.el (occur-1): Remove old fringe arrow. 2021-08-07 12:31:09 +02:00
Lars Ingebrigtsen
8ce7a697ca Allow building on MacOS with MacPorts and libgccjit
* configure.ac: Check for the "port" command (MacPorts).
Add the required lib/include directories for nativecomp.

* src/Makefile.in (LIBGCCJIT_CFLAGS, LIBGCCJIT_LIBS): Split into
two parts to allow including -L/-I for MacPorts.
(LIBES): Adjust.
(EMACS_CFLAGS): Ditto.
2021-08-07 11:56:44 +02:00
Glenn Morris
0b049fe71d Merge from origin/emacs-27
b77f6af24e (origin/emacs-27) ERC right stamps: also use latest buffer...

# Conflicts:
#	lisp/erc/erc-stamp.el
2021-08-06 08:49:32 -07:00
dickmao
c18bfbe6e4 Improve ffap-ido-mode test
* test/lisp/ffap-tests.el (ffap-ido-mode): Actually test
`ido-everywhere' at run time, not compile time (bug#49895).
2021-08-06 13:29:31 +02:00
dick r. chiang
93e1248c20 Fix problem with occasional stalls in `url-retrieve-synchronously'
* lisp/url/url.el (url-retrieve-synchronously): Use
`accept-process-output' on a null process.  That is the safer, more
conventional way of achieving non-blocking sleep-for (bug#49897).

Also rewrite for greater readability.
2021-08-06 13:28:13 +02:00
Eli Zaretskii
b17fd982a3 ; * doc/lispref/package.texi (Package Archives): Fix typo. 2021-08-06 14:20:54 +03:00
Lars Ingebrigtsen
483fce3093 Mention NonGNU in "Package Archives" node in the manual
* doc/lispref/package.texi (Package Archives): Mention NonGNU, too
(bug#49899).
2021-08-06 13:03:28 +02:00
Dmitry Gutov
35cea6c94c Add colon-space after prompt
* lisp/progmodes/project.el (project--completing-read-strict):
Fix last change's regression (bug#49865).
2021-08-06 11:36:14 +03:00
Eli Zaretskii
4d6511a284 Fix automatic hscrolling when line numbers are displayed
* src/xdisp.c (hscroll_window_tree): When line numbers are
displayed, account for the the line-number space when calculating
the desired X coordinate on the left.  (Bug#49891)
2021-08-06 10:51:45 +03:00
Eli Zaretskii
c327d61ec8 Improve wording of recently changed documentation
* src/minibuf.c (syms_of_minibuf):
* lisp/minibuffer.el (minibuffer-restore-windows):
* lisp/progmodes/etags.el (etags-xref-prefer-current-file):
Improve wording of doc strings.

* etc/NEWS: Improve wording and format of recently added entries.
2021-08-06 10:22:22 +03:00
Eli Zaretskii
9f88a9c058 Make sure installed *.eln files have correct permissions
* Makefile.in (install-eln): Add "umask 022" to ensure the *.eln
files are accessible from the user's Emacs session.  Suggested by
Wilhelm Kirschbaum <wkirschbaum@gmail.com>.  (Bug#49864)
2021-08-06 09:46:39 +03:00
Olivier Certner
b77f6af24e
ERC right stamps: also use latest buffer's window's width (Bug#44140)
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Use latest
buffer's window's width to position the timestamp, if both
`erc-timestamp-right-column' and `erc-fill-column' are not set (or
`erc-fill-mode' is off).  This is what the documentation says, but was
not implemented.  Also fix the bug of using selected window's width
instead of the (or some) window showing the buffer.  The latest
window's width is saved in `erc-timestamp-last-window-width' and used
when the buffer is no more shown.  In case the buffer was never shown,
which I'm not sure can happen, either use `fill-column' if set, or
give up on aligning and just output the timestamp (modulo the kludge)
right after message text.  While here, fix the off by one calculation
of point start when the reference is the window's width.
2021-08-06 00:26:01 -04:00
Dmitry Gutov
fa895379d6 Change how project-find-file's completion works
* lisp/progmodes/project.el (project--completing-read-strict):
Allow to choose a non-existent file, with confirmation
(bug#49204).
Don't use the string at point as a "real" default, and instead
only include it in "future history": meaning, it will be inserted
on 'M-n' (bug#49865).
2021-08-06 03:30:10 +03:00
Dmitry Gutov
d5a2fdeefb New option etags-xref-prefer-current-file
* lisp/progmodes/etags.el (etags-xref-prefer-current-file):
New user option (bug#2544).
(xref-backend-definitions): Use it.
2021-08-06 03:12:40 +03:00
Dmitry Gutov
f65958a94d Provide a default for xref-find-apropos pattern
* lisp/progmodes/xref.el (xref-find-apropos):
Provide a default for the pattern (bug#49731).
2021-08-06 03:02:13 +03:00
Dmitry Gutov
232be9bf87 Change the xref-goto-xref error message
* lisp/progmodes/xref.el (xref-goto-xref):
Change the error message (bug#49846).
2021-08-06 02:49:42 +03:00
Juri Linkov
18d7562e91 Add function minibuffer-restore-windows (bug#45072)
* lisp/minibuffer.el (minibuffer-restore-windows): New function
that removes the completions buffer.  Add it to minibuffer-exit-hook.
* src/minibuf.c (read-minibuffer-restore-windows): Mention
minibuffer-restore-windows.
2021-08-06 02:36:22 +03:00
Konstantin Kharlamov
4ec10c80ab Reset mtime of a buffer reverted "delicately"
* lisp/files.el (revert-buffer-insert-file-contents-delicately):
Once buffer is reverted, reset its mtime to that of the file.
(Bug#49893)
2021-08-05 20:45:02 +03:00
Eli Zaretskii
9d1c3c9830 Fix files-tests on non-Posix systems
* test/lisp/files-tests.el (files-test-auto-save-name-default)
(files-test-auto-save-name-transform)
(files-test-auto-save-name-unique, files-test-lock-name-default)
(files-test-lock-name-unique): Skip the drive letter in absolute
file names on MS-Windows/MS-DOS when comparing file names against
the expected ones.
(files-tests-file-name-non-special--subprocess): Skip test on
MS-Windows/MS-DOS.
2021-08-05 20:42:10 +03:00
Mattias Engdegård
2a17925aab Cease attempts to const-propagate through setq
The current method of propagating constants through setq was unsound
because it relied on each setq form only being traversed at most once
during optimisation, which isn't necessarily true in general; it could
be made to miscompile code in rare cases.

Since it was only used in limited circumstances, disabling this
optimisation doesn't cost us much.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't update the known value when traversing `setq`.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
2021-08-05 15:33:05 +02:00
Lars Ingebrigtsen
2d8c14d299 Fix M-n description in refcards
* etc/refcards/pl-refcard.tex (section{Szukanie przyrostowe}):
Ditto (in comments).

* etc/refcards/refcard.tex (section{Incremental Search}): Fix M-n
description (bug#49872).
2021-08-05 13:14:32 +02:00
Basil L. Contovounesios
0b5cc6c567 ; Fix oauth typos in last change. 2021-08-05 11:40:31 +01:00
Roland Winkler
1505dca91f Add support for the oauth2.el library in nnimap and smtpmail
* doc/misc/gnus.texi (Customizing the IMAP Connection):
* doc/misc/smtpmail.texi (Authentication): Mention it.

* lisp/gnus/nnimap.el (nnimap-login): Support oauth2.

* lisp/mail/smtpmail.el (smtpmail-try-auth-method): New function
for oauth2.
2021-08-05 12:33:21 +02:00
Glenn Morris
50d3178a4f * lisp/cus-start.el (read-minibuffer-restore-windows): Fix entry. 2021-08-04 17:43:43 -07:00
Juri Linkov
4b729ff608 * lisp/vc/smerge-mode.el (smerge-mode-menu): Add menu item for smerge-refine. 2021-08-04 23:43:21 +03:00
dickmao
1910800f93 Package archive location needs to be absolute filename
* lisp/emacs-lisp/package.el (package--with-response-buffer-1):
Actually check that URL is absolute (bug#49788).
2021-08-04 10:50:38 +02:00
Lars Ingebrigtsen
b8c43b594e Add a new thing-at-point type: existing-filename
* doc/lispref/text.texi (Buffer Contents): Mention it.

* lisp/thingatpt.el (thing-at-point-file-at-point): New function.
(existing-filename): Register it.
2021-08-04 10:35:53 +02:00
Lars Ingebrigtsen
b41f31d2b6 Make M-j' work reliably if comment-auto-fill-only-comments' is set
* lisp/simple.el (default-indent-new-line): Force breaking the
line when called interactively (bug#49849).  (Perhaps the
interactive command should be rebound and call this function
instead...)
2021-08-04 10:03:12 +02:00
Lars Ingebrigtsen
423a23ef75 Improve `define-globalized-minor-mode' doc strings
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Copy the description from easy-mmode--arg-docstring (bug#49843).
2021-08-04 09:38:45 +02:00
dickmao
253b36bd40 ffap ido accommodation
Now that ffap-file-finder can be ido-find-file, the
noninteractive portion of find-file-at-point cannot
assume ffap-file-finder always takes an argument
(ido-find-file does not).

* lisp/ffap.el (find-file-at-point): Do not call ffap-file-finder.
* test/lisp/ffap-tests.el (ffap-ido-mode): Test it.
2021-08-04 09:20:38 +02:00
Miha Rihtaršič
b4f3e6caba Use `abort-minibuffers' in delsel
* lisp/delsel.el (minibuffer-keyboard-quit): Use
`abort-minibuffers' (bug#49821).

Previously, C-g was bound to abort-recursive-edit, now it is bound to
abort-minibuffers.  However, after requiring delsel, it gets bound to
minibuffer-keyboard-quit, which still uses abort-recursive-edit.  Use
the new function instead.
2021-08-04 09:15:25 +02:00
martin rudalics
51583a0f9f Add new user option 'read-minibuffer-restore-windows'
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it
(bug#45072).

* lisp/cus-start.el (standard): Add.

* src/minibuf.c (syms_of_minibuf): New variable
'read-minibuffer-restore-windows'.
2021-08-04 08:48:18 +02:00
Lars Ingebrigtsen
bee3e51550 Update outdated Gnus information
* doc/misc/gnus.texi (History): Update information.
2021-08-04 07:34:58 +02:00
Phil Sainty
b84986af52 ; * lisp/so-long.el: Bump version for the GNU ELPA build
GNU ELPA released commit 359a8e4eda as
version 1.1.
2021-08-04 17:17:23 +12:00
Lars Ingebrigtsen
516affe1b3 Fix apparent typo in new cl-generic-tests.el test case 2021-08-04 06:38:34 +02:00
Stefan Monnier
b0d07396e8 * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning
Also remove "WARNING" annotations after confirming that he code was right.
2021-08-03 19:02:11 -04:00
akater
6535fd1fa9 Evaluate eql specializers
* lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Evaluate
forms that are eql specializers.  Provide backward compatibility
with a warning.

* test/lisp/emacs-lisp/cl-generic-tests.el: Add a test.
* lisp/emacs-lisp/bindat.el (bindat--type): Adhere to the new rule.
* lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Adhere to the new rule.
* lisp/emacs-lisp/map.el (map-into): Adhere to the new rule.
* lisp/emacs-lisp/radix-tree.el (map-into): Adhere to the new rule.
* lisp/frame.el (cl-generic-define-context-rewriter): Adhere to the new rule.
* lisp/gnus/gnus-search.el
(gnus-search-transform-expression): Adhere to the new rule.
* lisp/image/image-converter.el
(image-converter--probe image-converter--convert): Adhere to the new rule.
* lisp/mail/smtpmail.el (smtpmail-try-auth-method): Adhere to the new rule.
* lisp/progmodes/elisp-mode.el
(xref-backend-definitions)
(xref-backend-apropos): Adhere to the new rule.
* lisp/progmodes/etags.el (xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table)
(xref-backend-identifier-completion-ignore-case)
(xref-backend-definitions)(xref-backend-apropos): Adhere to the new rule.
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-cl-defmethod-with-types-ok)
(checkdoc-cl-defmethod-qualified-ok)
(checkdoc-cl-defmethod-with-extra-qualifier-ok): Adhere to the new rule.

* etc/NEWS: Describe the change.
2021-08-03 18:26:15 -04:00