summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/smie.el
Commit message (Collapse)AuthorAgeFilesLines
* Miscellaneous minor cleanups and simplifications.Stefan Monnier2012-06-231-7/+6
| | | | | | | | | | | * lisp/help-fns.el (describe-variable): Don't croak when doc is not found. * lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only. * lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more. * lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place. * lisp/emacs-lisp/smie.el (smie-next-sexp): CSE. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid ((lambda ..) ..). * lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
* Provide generalized variables in core Elisp.Stefan Monnier2012-06-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/gv.el: New file. * lisp/subr.el (push, pop): Extend to generalized variables. * lisp/loadup.el (macroexp): Unload if preloaded and uncompiled. * lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove. * lisp/emacs-lisp/cl-macs.el: Require gv. Use gv-define-setter, gv-define-simple-setter, and gv-define-expander. Remove setf-methods defined in gv. Rename cl-setf -> setf. (cl-setf, cl-do-pop, cl-get-setf-method): Remove. (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf) (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el. (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with gv-letplace. (cl-defstruct): Don't define setf-method any more. * lisp/emacs-lisp/cl.el (flet): Don't autoload. (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt) (define-setf-expander, defsetf, define-modify-macro) (cl-struct-setf-expander): Move from cl-lib.el. * lisp/emacs-lisp/syntax.el: * lisp/emacs-lisp/ewoc.el: * lisp/emacs-lisp/smie.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push. (timer--time): Use gv-define-simple-setter. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let² to avoid coding-system problems in subr.el. Adjust all users. (macroexp--maxsize, macroexp-small-p): New functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf. * lisp/scroll-bar.el (scroll-bar-mode): * lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode) (normal-erase-is-backspace-mode): Don't use the `eq' place. * lisp/winner.el (winner-configuration, winner-make-point-alist) (winner-set-conf, winner-get-point, winner-set): Don't abuse letf. * lisp/files.el (locate-file-completion-table): Avoid list*. Fixes: debbugs:11657
* Reduce use of cl in lisp/emacs-lisp/.Stefan Monnier2012-06-101-54/+57
| | | | | | | | | * lisp/emacs-lisp/timer.el, lisp/emacs-lisp/syntax.el, lisp/emacs-lisp/smie.el: * lisp/emacs-lisp/ewoc.el, lisp/emacs-lisp/cconv.el,lisp/emacs-lisp/derived.el: * lisp/emacs-lisp/byte-opt.el, lisp/emacs-lisp/autoload.el: Convert to cl-lib. * lisp/emacs-lisp/easymenu.el, lisp/emacs-lisp/easy-mmode.el: * lisp/emacs-lisp/bytecomp.el: Use pcase instead of `cl'. * lisp/emacs-lisp/cl-lib.el: Get rid of special cl-macs auto load.
* * lisp/emacs-lisp/smie.el (smie-indent--bolp-1): New function.Stefan Monnier2012-05-151-2/+24
| | | | (smie-indent-keyword): Use it.
* *** empty log message ***Stefan Monnier2012-05-131-2/+4
|
* lisp/*: Add declarations, remove unused bindings, mark unused args.Juanma Barranquero2012-04-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/avoid.el (mouse-avoidance-mode): Mark unused arg. (mouse-avoidance-nudge-mouse): Remove unused binding. * lisp/imenu.el (imenu-default-goto-function): Mark unused args. (imenu-progress-message): Remove obsolete macro; all callers changed. * lisp/mouse.el (mouse-menu-major-mode-map): * lisp/emacs-lisp/authors.el (authors-scan-change-log) (authors-add-to-author-list): * lisp/emacs-lisp/avl-tree.el (avl-tree--enter-balance): * lisp/emacs-lisp/smie.el (smie-auto-fill): * lisp/mail/sendmail.el (mail-bury): * lisp/mail/unrmail.el (unrmail): * lisp/net/tls.el (open-tls-stream): * lisp/textmodes/picture.el (picture-mouse-set-point): Remove unused bindings. * lisp/subr.el (keymap-canonicalize): Remove unused binding. (read-passwd): Mark unused arg. * lisp/tutorial.el (tutorial--display-changes): Remove unused binding. (tutorial--save-tutorial-to): Remove unused variable. * lisp/emacs-lisp/package.el (define-package, package-menu-mark-delete) (package-menu-mark-install, package-menu-mark-unmark): Mark unused args. (package-generate-autoloads, package-menu--generate) (package-menu--find-upgrades): Remove unused bindings. * lisp/emulation/cua-rect.el (cua-restrict-regexp-rectangle) (cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings. (cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle) (cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle) (cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle) (cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as) (cua--rectangle-aux-replace, cua--left-fill-rectangle) (cua-scroll-rectangle-up, cua-scroll-rectangle-down) (cua-delete-char-rectangle): Mark unused args. (cua-align-rectangle): Remove unused binding. * lisp/mail/rmail.el (compilation--message->loc) (epa--find-coding-system-for-mime-charset): Declare. * lisp/net/dbus.el (dbus-register-service): Declare. (dbus-name-owner-changed-handler): Remove unused binding. * lisp/nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p) (nxml-compute-indent-from-matching-start-tag): Remove unused variables. (nxml-scan-backward-within): Mark unused arg. (nxml-dynamic-markup-word): Remove unused binding.
* Merge from trunkStefan Monnier2012-03-251-53/+117
|\
| * Fix dead link in smie.elLeo Liu2012-02-041-1/+1
| | | | | | | | http://debbugs.gnu.org/10711
| * Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
| |
| * Spelling fixes.Paul Eggert2011-11-261-1/+1
| |
| * * lisp/emacs-lisp/smie.el: Improve warnings and conflict detection.Stefan Monnier2011-11-181-46/+109
| | | | | | | | | | | | | | | | | | | | (smie-warning-count): New var. (smie-set-prec2tab): Use it. (smie-bnf->prec2): Improve warnings. Add docstring. (smie-bnf--closer-alist): Rename from smie-bnf-closer-alist. (smie-bnf--set-class): New function. (smie-bnf--classify): Rename from smie-bnf-classify. Rewrite to fix corner case.
| * Spelling fixes.Paul Eggert2011-11-171-2/+3
| |
| * Fix typos.Juanma Barranquero2011-11-161-1/+1
| |
| * Spelling fixes.Paul Eggert2011-11-131-1/+1
| |
* | * lisp/emacs-lisp/smie.el: Provide smarter auto-filling.Stefan Monnier2012-02-151-0/+33
|/ | | | | (smie-auto-fill): New function. (smie-setup): Use it.
* * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Fix last change.Andreas Schwab2011-06-261-2/+2
| | | | (Bug#8934)
* * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable errorStefan Monnier2011-06-231-2/+6
| | | | messages for adjacent non-terminals.
* * src/eval.c (Fdefvaralias): Also mark the target as variable-special-p.Stefan Monnier2011-06-151-0/+20
|
* Misc fixes, and use lexical-binding in more files.Stefan Monnier2011-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (letrec): New macro. (with-wrapper-hook): Move from lisp/simple.el and don't use CL. * simple.el (with-wrapper-hook): Move with-wrapper-hook to subr.el. * lisp/help-fns.el (help-function-arglist): Handle subroutines as well. (describe-variable): Use special-variable-p to filter completions. * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't expand `declare' in defmacros. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Handle `declare'. * lisp/emacs-lisp/cl.el (pushnew): Silence unfixable warning. * lisp/emacs-lisp/cl-macs.el (defstruct, define-compiler-macro): Mark unused arg as unused. * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Use memq. * lisp/emacs-lisp/autoload.el (make-autoload): Don't assume the macro's first sexp is a list. (autoload-generate-file-autoloads): Improve error message. * lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist to understand the new byte-code arg format. * lisp/vc/smerge-mode.el: * lisp/vc/log-view.el: * lisp/vc/log-edit.el: * lisp/vc/cvs-status.el: * lisp/uniquify.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/bibtex-style.el: * lisp/reveal.el: * lisp/newcomment.el: * lisp/emacs-lisp/smie.el: * lisp/abbrev.el: Use lexical-binding. * src/eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR. (Fdefvar): Remove redundant SYMBOLP check. (Ffunctionp): Don't signal an error for undefined aliases. * doc/lispref/variables.texi (Converting to Lexical Binding): New node.
* * lisp/emacs-lisp/smie.el (smie-blink-matching-open): Don't use `pos' in twoStefan Monnier2011-02-101-4/+12
| | | | | | | conflicting ways. (smie-indent--parent): Extend to "parent of arg". (smie-indent-inside-string): New function. (smie-indent-functions): Use it.
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
|
* Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
|
* * emacs-lisp/smie.el (smie-prec2->grammar): Simplify handlingStefan Monnier2010-11-261-54/+66
| | | | | | | of :smie-open/close-alist. (smie-next-sexp): Make it accept a "start token" as argument. (smie-indent-keyword): Be careful not to misidentify tokens that span more than one line, as empty lines. Add argument `token'.
* * emacs-lisp/smie.el (smie-bnf-classify): Signal errors for tokensStefan Monnier2010-11-171-41/+55
| | | | | | | | | that are both openers (resp. closers) and something else. (smie-grammar): Loosen definition of valid values. (smie-next-sexp, smie-down-list, smie-blink-matching-open) (smie-indent--parent, smie-rule-parent, smie-indent-keyword) (smie-indent-after-keyword): Adjust users. (smie-indent-keyword): Don't indent empty lines.
* * lisp/emacs-lisp/smie.el (smie-prec2->grammar): Obey equality constraintsStefan Monnier2010-11-111-5/+40
| | | | when filling the remaining "unconstrained" values.
* * lisp/emacs-lisp/smie.el (smie-rule-parent, smie-indent--rule):Stefan Monnier2010-11-111-16/+51
| | | | | | | Use smie-indent-virtual when indenting relative to an opener. (smie-rule-separator): Use smie-rule-parent. (smie-indent-keyword): Consult rules, even for openers at bol. (smie-indent-comment-close): Try to align closer's content.
* * lisp/emacs-lisp/smie.el: New package.Stefan Monnier2010-11-071-0/+1462