From: Noam Postavsky <npostavs@gmail.com>
To: Corwin Brust <corwin@bru.st>
Cc: 43847@debbugs.gnu.org
Subject: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch*
Date: Wed, 07 Oct 2020 12:05:01 -0400 [thread overview]
Message-ID: <85k0w2xbrm.fsf@gmail.com> (raw)
In-Reply-To: <CAJf-WoRXFFBXA-mkGcv_-W6g2j3qt6fqS4YD20b8zwfmPuAR5Q@mail.gmail.com> (Corwin Brust's message of "Wed, 7 Oct 2020 10:30:47 -0500")
I hope an ERC user will follow up (I think Bandali was going over ERC
patches at some point?), but just some general comments:
> diff -u "c:/emacs/share/emacs/27.1/lisp/erc/erc.el-27.1" "c:/emacs/share/emacs/27.1/lisp/erc/erc.el"
> +(defun erc-yank (&optional arg)
> + "Unfill then yank. ARG is handled by `yank', which see."
> + (interactive)
> + (insert
> + (save-excursion
I believe the save-excursion is redundant since all the movement happens
inside a temp buffer.
> + (with-temp-buffer
> + (yank arg)
> + (goto-char (point-min))
> + (let ((fill-column (point-max))
> + (emacs-lisp-docstring-fill-column t))
I don't think binding emacs-lisp-docstring-fill-column should be needed?
> + (fill-paragraph))
The TAB character should be spaces instead. I recommend (setq-default
indent-tabs-mode nil), or at least
(defun my-lisp-mode-hook ()
(setq-local indent-tabs-mode nil))
(add-hook 'emacs-lisp-mode-hook #'my-lisp-mode-hook)
Note that if you edit the git repo, it comes with an indent-tabs-mode=nil
setting for emacs-lisp-mode in .dir-locals.el.
> + (buffer-string)))))
next prev parent reply other threads:[~2020-10-07 16:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 14:11 bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* Corwin Brust
2020-10-07 15:27 ` Noam Postavsky
2020-10-07 15:30 ` Corwin Brust
2020-10-07 16:05 ` Noam Postavsky [this message]
2020-10-09 2:01 ` Corwin Brust
2020-10-10 5:00 ` Corwin Brust
2020-10-07 16:56 ` Brett Gilio
2020-10-09 1:32 ` Corwin Brust
2020-10-09 1:59 ` Corwin Brust
2020-10-09 14:32 ` Brett Gilio
2020-10-09 4:54 ` Lars Ingebrigtsen
2020-10-09 7:52 ` Kévin Le Gouguec
2020-10-09 15:41 ` Corwin Brust
2020-10-09 16:00 ` Brett Gilio
2020-10-10 20:11 ` Lars Ingebrigtsen
2020-10-10 20:22 ` Brett Gilio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85k0w2xbrm.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=43847@debbugs.gnu.org \
--cc=corwin@bru.st \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).