emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shr-copy-url: arg misnamed?


From: T.V Raman
Subject: shr-copy-url: arg misnamed?
Date: Sat, 22 Sep 2018 09:12:18 -0700 (PDT)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]