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

254 Commits

Author SHA1 Message Date
Mattias Engdegård
3b7b181bde Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state.  Use it where applicable and obviously safe (erring on the
conservative side).

* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:35:56 +02:00
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
Amin Bandali
7a13ddfda0
Update a few more IRC-related references to point to Libera.Chat 2021-07-04 01:18:19 -04:00
Amin Bandali
8d957f2dd8
Merge from origin/emacs-27
348b2aed0c Update IRC-related references to point to Libera.Chat
b0e725e2fe Fix typo in c-macro-expand docstring

# Conflicts:
#	doc/misc/erc.texi
#	doc/misc/gnus-faq.texi
#	doc/misc/rcirc.texi
#	etc/NEWS
#	lisp/erc/erc-services.el
#	lisp/erc/erc.el
#	lisp/ldefs-boot.el
#	lisp/net/rcirc.el
2021-07-04 00:14:47 -04:00
Amin Bandali
348b2aed0c
Update IRC-related references to point to Libera.Chat
Per GNU and FSF's announcements [0, 1] of moving official IRC channels
to the Libera.Chat IRC network, as well as several Emacs-related
channels following suit [2], update IRC-related references to reflect
the migration.

[0]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html
[1]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html
[2]: https://lists.gnu.org/archive/html/info-gnu-emacs/2021-06/msg00000.html
2021-07-03 23:39:18 -04:00
Stefan Kangas
19ef864084 Fix an example in ERC docs
* doc/misc/erc.texi (Connecting):
* lisp/erc/erc.el (erc, erc-tls): Fix example to use J. Random Hacker
instead of Harry S. Truman.
2021-06-08 02:00:29 +02:00
Amin Bandali
c38b4a9bef
Tweak documentation relating to 'erc-tls'
* doc/misc/erc.texi (Connecting): Add a reference to the auth manual.
* etc/NEWS: Remove the verbose, detailed example of client certificate
specification and refer to the ERC manual instead.
* lisp/erc/erc.el (erc-tls): Fix leftover path example in docstring.
2021-05-10 21:36:33 -04:00
Amin Bandali
6a03e4cc4f
* lisp/erc/erc.el: Add past maintainer Michael Olson to Contributors. 2021-04-26 23:58:05 -04:00
Amin Bandali
344f769491
Add support for using a TLS client certificate with 'erc-tls' (bug#47788)
* lisp/erc/erc-backend.el (erc-session-client-certificate): New
buffer-local variable storing the TLS client certificate used for the
current connection.
(erc-open-network-stream): Use open-network-stream instead of
make-network-process, and pass any additional arguments to it.
(erc-server-connect): Add an optional client-certificate argument
that if present is passed with the :client-certificate keyword as part
of the arguments to erc-server-connect-function.
* lisp/erc/erc.el (erc-open): Add new optional client-certificate
argument, set it as erc-session-client-certificate, and pass it along
to erc-server-connect.
(erc): Clarify documentation string with respect to the full-name
argument.
(erc-tls): Add new client-certificate keyword argument and pass it in
the direct call to erc-open (instead of going through erc).
(erc-open-tls-stream): Pass any additional arguments (such as
:client-certificate) to open-network-stream.  Also allow overriding
:nowait if desired.

* doc/misc/erc.texi: Add documentation for erc-tls, including the new
:client-certificate argument.

* etc/NEWS: Announce the change.
2021-04-22 20:22:38 -04:00
Stefan Monnier
c45bfd3c4a * lisp/**/*.el: Avoid positional args to define-minor-mode
Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to
replace its old positional arguments.  Let's make sure we don't use
the old-style any more.

* lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/textmodes/tildify.el (tildify-mode):
* lisp/textmodes/sgml-mode.el (html-autoview-mode):
* lisp/textmodes/rst.el (rst-minor-mode):
* lisp/textmodes/remember.el (remember-notes-mode):
* lisp/textmodes/ispell.el (ispell-minor-mode):
* lisp/tar-mode.el (tar-subfile-mode):
* lisp/strokes.el (strokes-mode):
* lisp/so-long.el (so-long-minor-mode):
* lisp/shell.el (shell-dirtrack-mode):
* lisp/scroll-all.el (scroll-all-mode):
* lisp/ruler-mode.el (ruler-mode):
* lisp/rect.el (rectangle-mark-mode):
* lisp/progmodes/sh-script.el (sh-electric-here-document-mode):
* lisp/outline.el (outline-minor-mode):
* lisp/org/org.el (org-cdlatex-mode):
* lisp/org/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org/org-src.el (org-src-mode):
* lisp/org/org-list.el (org-list-checkbox-radio-mode):
* lisp/org/org-indent.el (org-indent-mode):
* lisp/org/org-capture.el (org-capture-mode):
* lisp/obsolete/pc-select.el (pc-selection-mode):
* lisp/obsolete/iswitchb.el (iswitchb-mode):
* lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode)
(rcirc-track-minor-mode):
* lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode):
* lisp/image-mode.el (image-minor-mode):
* lisp/ibuf-ext.el (ibuffer-auto-mode):
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode):
* lisp/font-core.el (font-lock-mode):
* lisp/erc/erc.el (define-erc-module):
* lisp/erc/erc-track.el (erc-track-minor-mode):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/epa-mail.el (epa-mail-mode):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode):
* lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode):
* lisp/dired-aux.el (dired-isearch-filenames-mode):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode):
* lisp/autoarg.el (autoarg-mode, autoarg-kp-mode):
* lisp/vc/pcvs.el (cvs-minor-mode):
Avoid old-style positional args to `define-minor-mode`.
2021-04-11 23:47:14 -04:00
Stefan Kangas
3492cc36f2 Remove redundant #' before lambda in {calendar,erc,mh-e}/*.el
* lisp/calendar/icalendar.el (icalendar--get-most-recent-observance):
* lisp/calendar/parse-time.el (parse-time-rules):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-track.el (erc-modified-channels-display):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol)
(erc-cmd-IGNORE, erc-cmd-JOIN, erc-default-server-handler)
(erc-banlist-update):
* lisp/mh-e/mh-search.el (mh-search, mh-mairix-convert-to-sop*)
(mh-index-create-sequences):
* lisp/mh-e/mh-thread.el (mh-toggle-threads, mh-thread-generate)
(mh-thread-prune-containers, mh-thread-sort-containers):
* lisp/mh-e/mh-utils.el (mh-sub-folders): Remove redundant #' before
lambda.
2021-04-09 00:04:13 +02:00
Stefan Kangas
49cbf2392b Delete empty "History" sections
* lisp/bs.el:
* lisp/calendar/timeclock.el:
* lisp/cedet/semantic/bovine/grammar.el:
* lisp/cedet/semantic/grammar.el:
* lisp/cedet/semantic/wisent.el:
* lisp/cedet/semantic/wisent/comp.el:
* lisp/cedet/semantic/wisent/java-tags.el:
* lisp/cedet/semantic/wisent/wisent.el:
* lisp/erc/erc.el:
* lisp/net/newst-treeview.el:
* lisp/recentf.el:
* lisp/ruler-mode.el:
* lisp/textmodes/remember.el:
* lisp/thumbs.el:
* lisp/tree-widget.el:
* lisp/vc/vc-hg.el: Delete empty "History" sections.

* lisp/cedet/semantic/grammar.el
(semantic-grammar-header-template): Don't add "History" section to
generated file.
2021-03-30 15:50:26 +02:00
Stefan Kangas
990e748cd0 Prefer https and fix broken links in ERC
* lisp/erc/erc-button.el (erc-button-rfc-url)
(erc-button-search-url): Prefer https.
* lisp/erc/erc-capab.el:
* lisp/erc/erc.el (erc-cmd-MODE): Fix broken links.
2021-03-20 10:00:28 +01:00
Stefan Monnier
f463633f00 lisp/erc: Use lexical-binding
Also remove various redundant `:group` arguments.

* lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare`
after the docstring.

* lisp/erc/erc-capab.el: Use lexical-binding.
(erc-capab-identify-activate): Simplify with `member`.

* lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition,
which refers to it.
(erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`.

* lisp/erc/erc-imenu.el: Use lexical-binding.
(erc-create-imenu-index): Remove unused var `prev-pos`.

* lisp/erc/erc-match.el: Use lexical-binding.
(erc-match-message): Remove unused var `old-pt`.
(erc-match-message): Strength-reduce `eval` to `symbol-value`.

* lisp/erc/erc-page.el: Use lexical-binding.
(erc-page): Move Custom group before `erg-page-mode` which refers to it.

* lisp/erc/erc-replace.el: Use lexical-binding.
(erc-replace-insert): Use `functionp`.

* lisp/erc/erc-status-sidebar.el: Use lexical-binding.
(erc-status-sidebar-open): Remove unused var `sidebar-window`.

* lisp/erc/erc.el: Fix header to use the customary 3 semi-colons.
(erc-fill-column): Declare variable.

* lisp/erc/erc-autoaway.el: Use lexical-binding.
* lisp/erc/erc-ezbounce.el: Use lexical-binding.
* lisp/erc/erc-fill.el: Use lexical-binding.
* lisp/erc/erc-goodies.el: Use lexical-binding.
* lisp/erc/erc-ibuffer.el: Use lexical-binding.
* lisp/erc/erc-identd.el: Use lexical-binding.
* lisp/erc/erc-join.el: Use lexical-binding.
* lisp/erc/erc-lang.el: Use lexical-binding.
* lisp/erc/erc-log.el: Use lexical-binding.
* lisp/erc/erc-menu.el: Use lexical-binding.
* lisp/erc/erc-netsplit.el: Use lexical-binding.
* lisp/erc/erc-networks.el: Use lexical-binding.
* lisp/erc/erc-pcomplete.el: Use lexical-binding.
* lisp/erc/erc-ring.el: Use lexical-binding.
* lisp/erc/erc-speedbar.el: Use lexical-binding.
* lisp/erc/erc-spelling.el: Use lexical-binding.
* lisp/erc/erc-truncate.el: Use lexical-binding.
* lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
Stefan Monnier
fb779e9857 * lisp/erc/erc.el: Fix problem pointed out by compiler warning
[ Also use `read-string` instead of `read-from-minibuffer`.  ]

(erc-part-from-channel): Comment out improbable
reference to the formal argument from within the interactive spec.
2021-03-07 19:06:06 -05:00
Stefan Kangas
856a0a913a Remove additional items obsolete since Emacs 22/23
* lisp/speedbar.el (speedbar-update-speed)
(speedbar-navigating-speed): Remove variables obsolete since Emacs 23.
(speedbar-dir-follow, speedbar-directory-buttons-follow): Don't use
above removed variables.

* lisp/erc/erc.el (erc-announced-server-name, erc-process)
(erc-default-coding-system, erc-send-command): Remove variables and
functions obsolete since Emacs 22.

; * etc/NEWS: List removed items.
2021-03-07 06:41:33 +01:00
Stefan Kangas
97f8ab359e Remove some references to Emacs 21
* lisp/erc/erc-track.el (erc-track-position-in-mode-line):
* lisp/erc/erc.el (erc-header-line-format):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/ruler-mode.el: Remove some references to Emacs 21.
2021-03-07 05:51:39 +01:00
Lars Ingebrigtsen
7ac99eeefe Change defcustom types of two non-standard hooks
* lisp/erc/erc.el (erc-before-connect, erc-after-connect): Change
type from 'hook to 'function (bug#34657).
2021-02-27 05:43:06 +01:00
Stefan Kangas
574f71b739 Remove Emacs 20 compat code for header-line-format
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/ibuffer.el (ibuffer-use-header-line): Remove Emacs 20 compat
code; header-line-format is always defined starting with Emacs 21.
2021-02-05 01:33:25 +01:00
Stefan Kangas
fc66ec3322 Prefer defvar-local in erc
* lisp/erc/erc-backend.el (erc-server-current-nick)
(erc-server-process, erc-session-server, erc-session-connector)
(erc-session-port, erc-server-announced-name)
(erc-server-version, erc-server-parameters)
(erc-server-connected, erc-server-reconnect-count)
(erc-server-quitting, erc-server-reconnecting)
(erc-server-timed-out, erc-server-banned)
(erc-server-error-occurred, erc-server-lines-sent)
(erc-server-last-peers, erc-server-last-sent-time)
(erc-server-last-ping-time, erc-server-last-received-time)
(erc-server-lag, erc-server-filter-data, erc-server-duplicates)
(erc-server-processing-p, erc-server-flood-last-message)
(erc-server-flood-queue, erc-server-flood-timer)
(erc-server-ping-handler):
* lisp/erc/erc-capab.el (erc-capab-identify-activated)
(erc-capab-identify-sent):
* lisp/erc/erc-dcc.el (erc-dcc-byte-count, erc-dcc-entry-data)
(erc-dcc-file-name):
* lisp/erc/erc-ezbounce.el (erc-ezb-session-list):
* lisp/erc/erc-join.el (erc--autojoin-timer):
* lisp/erc/erc-netsplit.el (erc-netsplit-list):
* lisp/erc/erc-networks.el (erc-network):
* lisp/erc/erc-notify.el (erc-last-ison, erc-last-ison-time):
* lisp/erc/erc-ring.el (erc-input-ring, erc-input-ring-index):
* lisp/erc/erc-stamp.el (erc-timestamp-last-inserted)
(erc-timestamp-last-inserted-left)
(erc-timestamp-last-inserted-right):
* lisp/erc/erc.el (erc-session-password, erc-channel-users)
(erc-server-users, erc-channel-topic, erc-channel-modes)
(erc-insert-marker, erc-input-marker, erc-last-saved-position)
(erc-dbuf, erc-active-buffer, erc-default-recipients)
(erc-session-user-full-name, erc-channel-user-limit)
(erc-channel-key, erc-invitation, erc-channel-list)
(erc-bad-nick, erc-logged-in, erc-default-nicks)
(erc-nick-change-attempt-count, erc-send-input-line-function)
(erc-channel-new-member-names, erc-channel-banlist)
(erc-current-message-catalog): Prefer defvar-local.
2021-01-31 04:44:30 +01:00
Stefan Monnier
42c3f7a134 * lisp/erc/erc.el (erc-process-input-line): Undo confused last change 2021-01-04 15:25:29 -05:00
Stefan Monnier
0c599ee2e2 * lisp/erc/erc.el: Use run-hook-with-args for erc-pre-send-functions
(erc-process-input-line): A function can be `listp`.
(erc-send-input): Use `run-hook-with-args` for `erc-pre-send-functions`.
(erc-display-command): Comment out, unused.
2021-01-04 00:21:02 -05:00
Paul Eggert
8bc552ffa5 Merge from origin/emacs-27
74a77ef299 Improve documentation of 'network-lookup-address-info'
c6d5555646 Display messages sent using ERC's /say
c156723769 Fix Rmail summary display when From: header is malformed
2021-01-01 01:14:58 -08:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Amin Bandali
c6d5555646
Display messages sent using ERC's /say
* lisp/erc/erc.el (erc-cmd-SAY): Call `erc-display-msg' to display the
user's message in the buffer, just like other [non-command] messages.

https://lists.gnu.org/r/help-gnu-emacs/2020-12/msg00066.html
2020-12-28 16:45:41 -05:00
Stefan Kangas
b3d315efc2 Prefer setq-local in erc
* lisp/erc/erc-goodies.el (erc-imenu-setup):
* lisp/erc/erc-list.el (erc-list-install-322-handler, erc-cmd-LIST):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-setup):
* lisp/erc/erc.el (erc-mode, erc-update-mode-line-buffer):
Prefer setq-local.
2020-12-04 11:14:26 +01:00
Stefan Kangas
ea218f424a Don't set XEmacs only properties start-open and end-open
* lisp/epa.el (epa-sign-region, epa-encrypt-region):
* lisp/erc/erc.el (erc-display-prompt):
* lisp/gnus/message.el (message-forward-make-body-mime):
* lisp/net/eudc-bob.el (eudc-bob-display-jpeg)
(eudc-bob-display-audio, eudc-bob-display-generic-binary):
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Don't set XEmacs
only properties start-open and end-open.
2020-11-20 16:43:57 +01:00
Stefan Kangas
51b9acbecc Assume font-lock is provided; it's preloaded since 22.1
* lisp/cedet/semantic/format.el (semantic--format-colorize-text):
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
* lisp/net/dig.el (dig-mode):
* lisp/progmodes/cperl-mode.el (cperl-pod-here-fontify):
* lisp/progmodes/idlw-help.el (idlwave-help-fontify):
* lisp/progmodes/idlwave.el (idlwave-completion-fontify-classes):
Don't check for feature 'font-lock; it has been preloaded since 22.1.
* lisp/cedet/semantic/format.el (font-lock):
* lisp/epa.el (font-lock):
* lisp/erc/erc.el (font-lock):
* lisp/generic-x.el (font-lock):
* lisp/net/sieve-mode.el (font-lock):
* lisp/progmodes/prolog.el (font-lock):
* lisp/textmodes/rst.el (font-lock): Remove unnecessary require.
2020-11-19 04:37:37 +01:00
Amin Bandali
694c82ab1a
Replace irc.freenode.net with chat.freenode.net
chat.freenode.net has been the preferred address for connecting to the
freenode IRC network for years now.  Replace the occurrences of
irc.freenode.net with chat.freenode.net.
2020-10-31 14:09:29 -04:00
Lars Ingebrigtsen
d5cb3cb9a4 Make erc expand the final abbrev
* lisp/erc/erc.el (erc-send-current-line): Expand abbrevs at the
end of lines (bug#42854).
2020-10-16 17:36:26 +02:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Lars Ingebrigtsen
660d13bd7b Use format-prompt in calls to completing-read with a default value
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/tab-bar.el (tab-bar-switch-to-tab):
* lisp/profiler.el (profiler-start):
* lisp/frame.el (set-frame-font):
* lisp/erc/erc.el (erc-join-channel):
* lisp/emacs-lock.el (emacs-lock--set-mode):
* lisp/emacs-lisp/elp.el (elp-set-master):
* lisp/emacs-lisp/checkdoc.el ()
(checkdoc-this-string-valid-engine):
* lisp/calendar/todo-mode.el (todo-find-filtered-items-file):
* lisp/calendar/calendar.el (calendar-set-date-style): Use
`format-prompt' in calls to completing-read that has a default
value, but didn't mention that in the prompt.
2020-09-06 20:35:11 +02:00
Lars Ingebrigtsen
87ded4c96d Remove some compat code from erc
* lisp/erc/erc.el (erc-mode): next-line-add-newlines is always
defined, so remove the check.
2020-08-19 11:32:56 +02:00
Stefan Kangas
32cb84974f
Make erc-compat.el obsolete
* lisp/erc/erc-compat.el: Move from here...
* lisp/obsolete/erc-compat.el: ...to here.
* lisp/erc/erc-backend.el:
* lisp/erc/erc-pcomplete.el:
* lisp/erc/erc-stamp.el:
* lisp/erc/erc-track.el:
* lisp/erc/erc.el: Don't require 'erc-compat'.

* lisp/erc/erc-backend.el (erc-decode-string-from-target):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/erc/erc-goodies.el (erc-controls-interpret):
* lisp/erc/erc-log.el (erc-log-setup-logging):
* lisp/erc/erc-notify.el (erc-notify-QUIT):
* lisp/erc/erc.el (erc-startup-file-list, define-erc-module)
(erc-canonicalize-server-name, erc-cmd-SV, erc-banlist-update)
(erc-group-list, erc-seconds-to-string): Adjust callers.
* lisp/erc/erc.el: Require cl-lib and format-spec.

* etc/NEWS: Add entry announcing erc-compat.el being marked as
obsolete.
2020-08-13 19:31:54 -04:00
Mingde (Matthew) Zeng
88567ca8ec Fix erc-reuse-buffers behavior
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fixes behavior 1,
also determines if the '#channel/server' buffer already exists
and will reuse that buffer when joining on the same
server. Additionally when creating a new buffer with
'#channel/serverB', the existing buffer '#channel' on 'severA' will be
renamed to '#channel/serverA' for the sake of consistency (bug#40121).

* lisp/erc/erc-join.el (erc-autojoin-channels): The logic is
simplified ensuring that when autojoining channels specified in
erc-autojoin-channels-alist, if there exists an erc buffer with the
same channel name but a different server, it will create a new buffer
to join the channel. The current logic is very weak that will skip
joining same channel on different servers altogether.

By the definition of erc-reuse-buffers, if non-nil it should create a
new buffer when joining channels with same names on different
servers. The current behavior of erc-reuse-buffers is:
1. when non-nil, it will always reuse the same channel buffer,
resulting in server A's channel gets reconnected to the channel with
the same name of server B.
2. when nil, the buffer-name of the joined channel is
'#channel/server'. However if one tries to '/join #channel' from the
server buffer, it creates a new empty buffer with buffer-name
'#channel', instead of opening the already-joined channel buffer.
2020-08-12 13:09:40 +02:00
Stefan Kangas
7ed61d6193 Make more erc function aliases obsolete
* lisp/erc/erc-compat.el (erc-propertize, erc-view-mode-enter)
(erc-function-arglist, erc-delete-dups)
(erc-replace-regexp-in-string): Make these aliases obsolete.

* lisp/erc/erc-capab.el (erc-capab-identify-add-prefix)
(erc-capab-identify-remove/set-identified-flag):
* lisp/erc/erc-dcc.el (erc-dcc-chat-parse-output)
(erc-dcc-unquote-filename, pcomplete/erc-mode/DCC):
* lisp/erc/erc-list.el (erc-list-menu-mode, erc-list-button)
(erc-list-make-string):
* lisp/erc/erc-log.el (erc-log-standardize-name):
* lisp/erc/erc-match.el (erc-log-matches-make-buffer):
* lisp/erc/erc-networks.el (erc-server-select):
* lisp/erc/erc.el (erc-message-english-PART)
(erc-update-mode-line-buffer, erc-format-my-nick)
(erc-format-@nick, erc-get-user-mode-prefix, erc-display-prompt)
(erc-part-reason-zippy, erc-quit-reason-zippy, erc-get-arglist)
(erc-toggle-debug-irc-protocol, erc-log-irc-protocol)
(erc-migrate-modules): Adjust callers.
2020-08-07 14:02:01 +02:00
Kevin Brubeck Unhammer
c72b734c91 Further fix for erc-generate-new-buffer-name
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix buffer name
generation when there's two networks on the same
server:port (bug#40121).
2020-08-05 11:13:51 +02:00
Lars Ingebrigtsen
a59296d998 Make the erc /ignore command prompt for a timeout
* lisp/erc/erc.el (erc--unignore-user): Separate into own function
(bug#40137).
(erc-cmd-IGNORE): Ask if the user wants a timeout.
(erc--read-time-period): New function.
2020-08-05 10:27:40 +02:00
Lars Ingebrigtsen
6f94c2405f Fix erc bug when there's two channels with the same name
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix logic when
there's two channels with the same name from two different servers
(bug#40121).
2020-08-02 09:43:41 +02:00
Philip K
bcf486c604 Make the erc-header-line default to header-line
* lisp/erc/erc.el (erc-header-line): Inherit from header-line (the
old values were very similar in light mode, but very different
in dark mode) (bug#41095).
2020-07-29 06:54:05 +02:00
Basil L. Contovounesios
0185d76e74 Fix and extend format-spec (bug#41758)
* lisp/format-spec.el: Use lexical-binding.  Remove dependence on
subr-x.el.
(format-spec-make): Clarify docstring.
(format-spec--parse-modifiers): Rename to...
(format-spec--parse-flags): ...this and simplify.  In particular,
don't bother parsing :space-pad which is redundant and unused.
(format-spec--pad): Remove, replacing with...
(format-spec--do-flags): ...this new helper function which performs
more of format-spec's supported text manipulation.
(format-spec): Autoload.  Allow optional argument to take on special
values 'ignore' and 'delete' for more control over what happens when
a replacement for a format specification isn't provided.  Bring back
proper support for a precision modifier similar to that of 'format'.

* lisp/battery.el (battery-format): Rewrite in terms of format-spec.
(battery-echo-area-format, battery-mode-line-format): Mention
support of format-spec syntax in docstrings.

* doc/lispref/strings.texi (Custom Format Strings):
* etc/NEWS: Document and announce these changes.

* lisp/dired-aux.el (dired-do-compress-to):
* lisp/erc/erc-match.el (erc-log-matches):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/gnus/gnus-sieve.el (gnus-sieve-update):
* lisp/gnus/gssapi.el (open-gssapi-stream):
* lisp/gnus/mail-source.el (mail-source-fetch-file)
(mail-source-fetch-directory, mail-source-fetch-pop)
(mail-source-fetch-imap):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/image-dired.el:
* lisp/net/eww.el:
* lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
(imap-shell-open):
* lisp/net/network-stream.el (network-stream-open-shell):
* lisp/obsolete/tls.el (open-tls-stream):
* lisp/textmodes/tex-mode.el:
Remove extraneous loads and autoloads of format-spec now that it is
autoloaded and simplify its uses where possible.

* test/lisp/battery-tests.el (battery-format): Test new format-spec
support.
* test/lisp/format-spec-tests.el (test-format-spec): Rename to...
(format-spec) ...this, extending test cases.
(test-format-unknown): Rename to...
(format-spec-unknown): ...this, extending test cases.
(test-format-modifiers): Rename to...
(format-spec-flags): ...this.
(format-spec-make, format-spec-parse-flags, format-spec-do-flags)
(format-spec-do-flags-truncate, format-spec-do-flags-pad)
(format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
2020-06-18 12:46:21 +01:00
Amin Bandali
9e832ba91b
* lisp/erc/erc.el: Add URL to the new ERC page on the Emacs site 2020-04-16 15:11:11 -04:00
Amin Bandali
38f7538d8f
New function erc-switch-to-buffer-other-window
* lisp/erc/erc.el (erc-switch-to-buffer): Factor out the buffer choice
implementation from here ...
(erc--switch-to-buffer): ... to here.
(erc-switch-to-buffer-other-window): New function, like
`erc-switch-to-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.
2020-04-13 23:35:34 -04:00
Amin Bandali
1aa1529301
ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
Amin Bandali
5cb312b5b9
Update ERC mailing list address
* lisp/erc/erc.el (erc-official-location): As part of bringing ERC
under the Emacs umbrella, erc-discuss has been renamed to emacs-erc,
and will be *the* mailing list for discussions and announcements about
ERC going forward.  The other two lists, erc-announce and erc-commit,
are now retired.  For more details, see the announcement at
<https://lists.gnu.org/archive/html/emacs-erc/2020-03/msg00001.html>.
2020-03-06 13:03:12 -05:00
Amin Bandali
36a4068105
ERC: New maintainer.
* admin/MAINTAINERS: Add entries for Amin Bandali, new maintainer for
ERC, and interested in maintaining Eshell.
* lisp/erc/*: New maintainer.
2020-01-17 21:45:10 -05:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Lars Ingebrigtsen
925872ee7b Make ERC respect erc-channel-hide-list
* lisp/erc/erc.el (erc-hide-current-message-p): Make
erc-channel-hide-list work (bug#37879) by getting matching on the
channel name instead of the ERC client name.
2019-10-28 15:31:39 +01:00