all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "T.V Raman" <raman@google.com>
To: emacs-devel@gnu.org
Subject: shr-copy-url: arg misnamed?
Date: Sat, 22 Sep 2018 09:12:18 -0700 (PDT)	[thread overview]
Message-ID: <20180922161218.BA963C20207@raman-glaptop.localdomain> (raw)

Should the arg in this function be renamed?

The name "url" is confusing, and is likely being shadowed 
(defun shr-copy-url (url)
  "Copy the URL under point to the kill ring.
If IMAGE-URL (the prefix) is non-nil, or there is no link under
point, but there is an image under point then copy the URL of the
image under point instead."
  (interactive (list (shr-url-at-point current-prefix-arg)))
  (if (not url)
      (message "No URL under point")
    (setq url (url-encode-url url))
    (kill-new url)
    (message "Copied %s" url)))
-- 

-- 



             reply	other threads:[~2018-09-22 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-22 16:12 T.V Raman [this message]
2018-09-23 20:04 ` shr-copy-url: arg misnamed? Noam Postavsky
2018-09-23 23:45   ` T.V Raman
2018-09-25  0:42     ` Noam Postavsky
2018-09-25  7:31     ` Andreas Schwab
2018-09-25 13:55       ` T.V Raman
2018-09-25 14:27         ` Noam Postavsky
2018-09-23 20:57 ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180922161218.BA963C20207@raman-glaptop.localdomain \
    --to=raman@google.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.