diff options
| author | Stefan Monnier | 2011-06-15 14:36:00 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-06-15 14:36:00 -0400 |
| commit | 0ac306045f2e03289032f4303e3c86dcbca89cc2 (patch) | |
| tree | da4fd3596da53c2f7f5748ef019394400d5800e2 | |
| parent | 2b75be6704c3adf2f6ec9428dbcca90bf28043ef (diff) | |
| download | emacs-0ac306045f2e03289032f4303e3c86dcbca89cc2.tar.gz emacs-0ac306045f2e03289032f4303e3c86dcbca89cc2.zip | |
* src/eval.c (Fdefvaralias): Also mark the target as variable-special-p.
| -rw-r--r-- | lisp/emacs-lisp/smie.el | 20 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/eval.c | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 2701d6b940b..17cc5668b5f 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el | |||
| @@ -84,6 +84,26 @@ | |||
| 84 | ;; - Maybe accept two juxtaposed non-terminals in the BNF under the condition | 84 | ;; - Maybe accept two juxtaposed non-terminals in the BNF under the condition |
| 85 | ;; that the first always ends with a terminal, or that the second always | 85 | ;; that the first always ends with a terminal, or that the second always |
| 86 | ;; starts with a terminal. | 86 | ;; starts with a terminal. |
| 87 | ;; - Permit EBNF-style notation. | ||
| 88 | ;; - If the grammar has conflicts, the only way is to make the lexer return | ||
| 89 | ;; different tokens for the different cases. This extra work performed by | ||
| 90 | ;; the lexer can be costly and unnecessary: we perform this extra work every | ||
| 91 | ;; time we find the conflicting token, regardless of whether or not the | ||
| 92 | ;; difference between the various situations is relevant to the current | ||
| 93 | ;; situation. E.g. we may try to determine whether a ";" is a ";-operator" | ||
| 94 | ;; or a ";-separator" in a case where we're skipping over a "begin..end" pair | ||
| 95 | ;; where the difference doesn't matter. For frequently occurring tokens and | ||
| 96 | ;; rarely occurring conflicts, this can be a significant performance problem. | ||
| 97 | ;; We could try and let the lexer return a "set of possible tokens | ||
| 98 | ;; plus a refinement function" and then let parser call the refinement | ||
| 99 | ;; function if needed. | ||
| 100 | ;; - Make it possible to better specify the behavior in the face of | ||
| 101 | ;; syntax errors. IOW provide some control over the choice of precedence | ||
| 102 | ;; levels within the limits of the constraints. E.g. make it possible for | ||
| 103 | ;; the grammar to specify that "begin..end" has lower precedence than | ||
| 104 | ;; "Module..EndModule", so that if a "begin" is missing, scanning from the | ||
| 105 | ;; "end" will stop at "Module" rather than going past it (and similarly, | ||
| 106 | ;; scanning from "Module" should not stop at a spurious "end"). | ||
| 87 | 107 | ||
| 88 | ;;; Code: | 108 | ;;; Code: |
| 89 | 109 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index c72311c305f..821e4090cfd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * eval.c (Fdefvaralias): Also mark the target as variable-special-p. | ||
| 4 | |||
| 1 | 2011-06-14 Jan Djärv <jan.h.d@swipnet.se> | 5 | 2011-06-14 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * xfns.c (x_set_scroll_bar_default_width): Remove argument to | 7 | * xfns.c (x_set_scroll_bar_default_width): Remove argument to |
diff --git a/src/eval.c b/src/eval.c index ef5abac17ae..d6f9a9ede81 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -772,6 +772,7 @@ The return value is BASE-VARIABLE. */) | |||
| 772 | } | 772 | } |
| 773 | 773 | ||
| 774 | sym->declared_special = 1; | 774 | sym->declared_special = 1; |
| 775 | XSYMBOL (base_variable)->declared_special = 1; | ||
| 775 | sym->redirect = SYMBOL_VARALIAS; | 776 | sym->redirect = SYMBOL_VARALIAS; |
| 776 | SET_SYMBOL_ALIAS (sym, XSYMBOL (base_variable)); | 777 | SET_SYMBOL_ALIAS (sym, XSYMBOL (base_variable)); |
| 777 | sym->constant = SYMBOL_CONSTANT_P (base_variable); | 778 | sym->constant = SYMBOL_CONSTANT_P (base_variable); |