mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Avoid looking at localized strings
* lisp/xdg.el (xdg-desktop-read-group): Add condition to catch localized strings. * test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure parsing l10n strings doesn't error but is essentially a no-op.
This commit is contained in:
parent
3ef0c16484
commit
e716538911
3 changed files with 19 additions and 1 deletions
|
|
@ -177,6 +177,8 @@ This should be called at the beginning of a line."
|
|||
((= (following-char) ?#))
|
||||
((looking-at xdg-desktop-entry-regexp)
|
||||
(puthash (match-string 1) (match-string 2) res))
|
||||
;; Filter localized strings
|
||||
((looking-at (rx (group-n 1 (+ (in alnum "-"))) (* blank) "[")))
|
||||
(t (error "Malformed line: %s"
|
||||
(buffer-substring (point) (point-at-eol)))))
|
||||
(forward-line))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue