Elisp里有啥函数可以快速修改列表里的值?

Pyim里的标点保存在一个变量里。Elisp里有啥函数可以快速修改列表里的值。

(defcustom pyim-punctuation-dict
  '(("'" "‘" "’")
    ("\"" "“" "”")
    ("_" "―")
    ("^" "…")
    ("]" "】")
    ("[" "【")
    ("@" "◎")
    ("?" "?")
    (">" "》")
    ("=" "=")
    ("<" "《")
    (";" ";")
    (":" ":")
    ("/" "、")
    ("." "。")
    ("-" "-")
    ("," ",")
    ("+" "+")
    ("*" "×")
    (")" ")")
    ("(" "(")
    ("&" "※")
    ("%" "%")
    ("$" "¥")
    ("#" "#")
    ("!" "!")
    ("`" "・")
    ("~" "~")
    ("}" "』")
    ("|" "÷")
    ("{" "『"))
  "标点符号表."
  :group 'pyim
  :type 'list)
1 个赞
(let ((l '(("foo" "bar"))))
  (setf (cdr (assoc "foo" l)) '("quux"))
  l)
;; => (("foo" "quux"))
2 个赞