summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/thunk.el
diff options
context:
space:
mode:
authorŠtěpán Němec <stepnem@gmail.com>2020-04-12 19:57:59 +0200
committerŠtěpán Němec <stepnem@gmail.com>2020-04-13 12:03:38 +0200
commit81d07da788e7caea266f4a520cd9922c990d04e9 (patch)
tree47305fdb2e8b01ecea49a5f35e058ec7becfd090 /lisp/emacs-lisp/thunk.el
parent1dfc497fac22c199a944ef64233266bd6cd2fee6 (diff)
downloademacs-81d07da788e7caea266f4a520cd9922c990d04e9.tar.gz
emacs-81d07da788e7caea266f4a520cd9922c990d04e9.tar.bz2
emacs-81d07da788e7caea266f4a520cd9922c990d04e9.zip
gnus-shorten-url: Improve and avoid args-out-of-range error
'gnus-shorten-url' (used by 'gnus-summary-browse-url') ignored fragment identifiers and didn't check substring bounds, in some cases leading to runtime errors, e.g.: (gnus-shorten-url "https://some.url.with/path/and#also_a_long_target" 40) ;; => Lisp error: (args-out-of-range "/path/and" -18 nil) This commit makes it account for #fragments and fixes faulty string computation. (bug#39980) Do not merge to master, where the helper is put to subr-x.el. * lisp/gnus/gnus-sum.el (gnus--string-truncate-left): New helper function (copied from 'ediff-truncate-string-left'). (gnus-shorten-url): Use it and don't drop #fragments.
Diffstat (limited to 'lisp/emacs-lisp/thunk.el')
0 files changed, 0 insertions, 0 deletions