Mercurial > hg > xemacs-beta
diff lisp/bytecomp.el @ 5344:2a54dfbe434f
Don't quote keywords, they've been self-quoting for well over a decade.
2011-01-22 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-setq, byte-compile-set):
Remove kludge allowing keywords' values to be set, all the code
that does that is gone.
* cl-compat.el (elt-satisfies-test-p):
* faces.el (set-face-parent):
* faces.el (face-doc-string):
* gtk-font-menu.el:
* gtk-font-menu.el (gtk-reset-device-font-menus):
* msw-font-menu.el:
* msw-font-menu.el (mswindows-reset-device-font-menus):
* package-get.el (package-get-installedp):
* select.el (select-convert-from-image-data):
* sound.el:
* sound.el (load-sound-file):
* x-font-menu.el (x-reset-device-font-menus-core):
Don't quote keywords, they're self-quoting, and the
win from backward-compatibility is sufficiently small now that the
style problem overrides it.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 22 Jan 2011 23:29:25 +0000 |
parents | ec05a30f7148 |
children | 38e24b8be4ea |
line wrap: on
line diff
--- a/lisp/bytecomp.el Sat Jan 22 17:21:22 2011 +0000 +++ b/lisp/bytecomp.el Sat Jan 22 23:29:25 2011 +0000 @@ -3729,13 +3729,10 @@ ;; Odd number of args? Let `set' get the error. (byte-compile-form `(set ',var) for-effect) (setq val (pop args)) - (if (keywordp var) - ;; (setq :foo ':foo) compatibility kludge - (byte-compile-form `(set ',var ,val) (if args t for-effect)) - (byte-compile-form val) - (unless (or args for-effect) - (byte-compile-out 'byte-dup 0)) - (byte-compile-variable-ref 'byte-varset var)))))) + (byte-compile-form val) + (unless (or args for-effect) + (byte-compile-out 'byte-dup 0)) + (byte-compile-variable-ref 'byte-varset var))))) (setq for-effect nil)) (defun byte-compile-set (form) @@ -3745,11 +3742,10 @@ (let ((symform (nth 1 form)) (valform (nth 2 form)) sym) - (if (and (= (length form) 3) - (= (safe-length symform) 2) + (if (and (eql (length form) 3) + (eql (safe-length symform) 2) (eq (car symform) 'quote) - (symbolp (setq sym (car (cdr symform)))) - (not (byte-compile-constant-symbol-p sym))) + (symbolp (setq sym (car (cdr symform))))) (byte-compile-setq `(setq ,sym ,valform)) (byte-compile-two-args form))))