summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* New macro define-adviceLeo Liu2014-11-181-2/+2
| | | | | | | | | | * doc/lispref/functions.texi (Advising Named Functions): Document define-advice. * lisp/emacs-lisp/nadvice.el (define-advice): New macro. * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add define-advice. (lisp-font-lock-keywords-1): Add define-advice.
* Font-lock `cl-flet*', too.Thien-Thi Nguyen2014-09-281-1/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): Add "flet*" to intermediate var `cl-lib-kw'.
* Introduce global-eldoc-mode. Move Elisp-specific code to elisp-mode.el.Stefan Monnier2014-09-261-661/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): New minor mode. (eldoc-schedule-timer): Obey it. (eldoc-documentation-function): Default to nil. (eldoc-mode): Don't enable if eldoc-documentation-function is not set. (eldoc-documentation-function-default, eldoc-get-fnsym-args-string) (eldoc-highlight-function-argument, eldoc-get-var-docstring) (eldoc-last-data-store, eldoc-docstring-first-line) (eldoc-docstring-format-sym-doc, eldoc-fnsym-in-current-sexp) (eldoc-beginning-of-sexp, eldoc-current-symbol) (eldoc-function-argstring): Move to elisp-mode.el. (eldoc-symbol-function): Remove, unused. * lisp/progmodes/elisp-mode.el: New file. Rename all "eldoc-*" to "elisp--*". (elisp-completion-at-point): Rename from lisp-completion-at-point. (elisp--preceding-sexp): Rename from preceding-sexp. * lisp/loadup.el: Load new file progmodes/elisp-mode. * lisp/ielm.el (inferior-emacs-lisp-mode): Set eldoc-documentation-function. * lisp/emacs-lisp/lisp.el (lisp--local-variables-1, lisp--local-variables) (lisp--local-variables-completion-table, lisp--expect-function-p) (lisp--form-quoted-p, lisp--company-doc-buffer) (lisp--company-doc-string, lisp--company-location) (lisp-completion-at-point): Move to elisp-mode.el. * lisp/emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): New syntax-table, extracted from emacs-lisp-mode-syntax-table. (emacs-lisp-mode-abbrev-table, emacs-lisp-mode-syntax-table): Move to elisp-mode.el. (lisp-imenu-generic-expression): Add comments to document what comes from which Lisp dialect. (emacs-lisp-mode-map, emacs-lisp-byte-compile) (emacs-lisp-byte-compile-and-load, emacs-lisp-mode-hook) (emacs-lisp-mode, emacs-list-byte-code-comment-re) (emacs-lisp-byte-code-comment) (emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode) (lisp-interaction-mode-map, lisp-interaction-mode) (eval-print-last-sexp, last-sexp-setup-props) (last-sexp-toggle-display, prin1-char, preceding-sexp) (eval-last-sexp-1, eval-last-sexp-print-value) (eval-last-sexp-fake-value, eval-sexp-add-defvars, eval-last-sexp) (eval-defun-1, eval-defun-2, eval-defun): Move to elisp-mode.el. * src/lisp.mk (lisp): Add elisp-mode.elc.
* * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): AddLeo Liu2014-09-141-3/+3
| | | | | | | | | | pcase-exhaustive. * emacs-lisp/pcase.el (pcase--dontwarn-upats): New var. (pcase--expand): Use it. (pcase-exhaustive): New macro. Fixes: debbugs:16567
* * etc/NEWS: New Tramp method "nc".Robert Brown (tiny change)2014-06-191-26/+38
| | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p): New fun. (lisp-string-in-doc-position-p): New function, extracted from lisp-font-lock-syntactic-face-function. (lisp-font-lock-syntactic-face-function): Use them. Fixes: debbugs:9130
* Add with-file-modes macro, and use itGlenn Morris2014-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (with-file-modes): New macro. * lisp/printing.el (pr-save-file-modes): * lisp/eshell/esh-util.el (eshell-with-file-modes): Make obsolete. * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Add with-file-modes. * lisp/doc-view.el (doc-view-make-safe-dir): * lisp/epg.el (epg--start): * lisp/files.el (locate-user-emacs-file, make-temp-file) (backup-buffer-copy, move-file-to-trash): * printing.el (pr-despool-print, pr-call-process, pr-text2ps): * eshell/esh-util.el (eshell-with-private-file-modes) (eshell-make-private-directory): * lisp/net/browse-url.el (browse-url-mosaic): * lisp/obsolete/mailpost.el (post-mail-send-it): * lisp/obsolete/pgg-pgp.el (pgg-pgp-verify-region): * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-verify-region): * lisp/url/url-util.el (url-make-private-file): Use with-file-modes. * doc/lispref/files.texi (Changing Files): Mention with-file-modes. * etc/NEWS: Mention this.
* * lisp/emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," whichStefan Monnier2014-05-101-16/+10
| | | | are a hindrance for C-x C-e.
* * lisp/emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): Only highlight pastStefan Monnier2014-05-011-1/+2
| | | | | | the last consecutive closing paren. Fixes: debbugs:17345
* Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.deJuanma Barranquero2014-04-251-1/+1
|\
| * * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):Leo Liu2014-04-241-1/+1
| | | | | | | | | | | | Fix syntax for @. Fixes: debbugs:17325
* | * lisp/emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): New function.Stefan Monnier2014-04-221-1/+24
| | | | | | | | | | (lisp-el-font-lock-keywords-2, lisp-cl-font-lock-keywords-2): Use it. (lisp-mode-variables): Set font-lock-extra-managed-props.
* | * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): AddLeo Liu2014-04-051-1/+2
|/ | | | define-compilation-mode.
* Fix debbugs#16971Dmitry Gutov2014-03-171-7/+2
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Set `comment-use-syntax' to t to avoid the unnecessary runtime check. Set `comment-start-skip' to a simpler value that doesn't try to check if the semicolon is escaped (this is handled by `syntax-ppss' now). * lisp/progmodes/scheme.el (scheme-mode-variables): Same.
* Replace "Maintainer: FSF" with the emacs-devel mailing addressGlenn Morris2014-02-091-1/+1
|
* Replace refs to obsolete alias `turn-on-eldoc-mode' with `eldoc-mode'Glenn Morris2014-01-291-2/+2
| | | | | | | | | | | * lisp/hexl.el (hexl-mode-hook): * lisp/ielm.el (ielm-mode-hook): * lisp/emacs-lisp/lisp-mode.el (emacs-lisp-mode-hook) (lisp-interaction-mode-hook): * lisp/progmodes/cfengine.e (cfengine3-documentation-function): Replace obsolete alias `turn-on-eldoc-mode' with `eldoc-mode'. * lisp/emacs-lisp/eldoc.el: Same in commentary.
* Doc fixes related to zero prefix argument of eval-expression etcGlenn Morris2014-01-221-11/+14
| | | | | * emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-last-sexp): * simple.el (eval-expression): Doc fixes.
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Don't bother withStefan Monnier2014-01-031-1/+1
| | | | | | syntax-begin-function. Fixes: debbugs:16247
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Revert unnecessary earlier changeGlenn Morris2013-12-271-4/+3
|
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Unbreak bootstrap.Glenn Morris2013-12-271-3/+4
|
* Make Electric Pair mode smarter/more useful:João Távora2013-12-261-1/+7
| | | | | | | | | | | | | | | | * lisp/electric.el: Pairing/skipping helps preserve balance. Autobackspacing behaviour. Opens extra newlines between pairs. Skip whitespace before closing delimiters. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Use new features. * test/automated/electric-tests.lisp: New file. * doc/emacs/programs.texi: Describe new features. * lisp/simple.el: Pass non-nil interactive arg to newline call inside newline-and-indent.
* * lisp/simple.el (eval-expression-print-format): Don't check forJuri Linkov2013-12-191-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | command names and the last command. Always display additional formats of the integer result in the echo area, and insert them to the current buffer only with a zero prefix arg. Display character when char-displayable-p is non-nil. (eval-expression): With a zero prefix arg, set `print-length' and `print-level' to nil, and insert the integer values from `eval-expression-print-format' at the end. Doc fix. * lisp/emacs-lisp/lisp-mode.el (eval-print-last-sexp): Add arg `eval-last-sexp-arg-internal'. Doc fix. (eval-last-sexp-1): Pass arg `eval-last-sexp-arg-internal' to `eval-last-sexp-print-value'. Doc fix. (eval-last-sexp-print-value): Add arg `eval-last-sexp-arg-internal'. Set `print-length' and `print-level' to nil when arg is zero. (eval-last-sexp): Doc fix. (eval-defun-2): Print the integer values from `eval-expression-print-format' at the end. * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Print the integer values from `eval-expression-print-format' at the end. * lisp/ielm.el (ielm-eval-input): Print the integer values from `eval-expression-print-format' at the end. Fixes: debbugs:12985
* * lisp/progmodes/python.el (python-mode): Remove incorrect text from docstring.Bozhidar Batsov2013-11-051-10/+3
| | | | | | | * lisp/progmodes/scheme.el (scheme-mode): Remove incorrect text from docstring. * lisp/progmodes/prolog.el (prolog-mode): Remove incorrect text from docstring. * lisp/emacs-lisp/lisp-mode.el (lisp-mode, lisp-interaction-mode, emacs-lisp-mode): Remove incorrect text from docstring.
* * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): Fix cut&paste.Helmut Eller2013-10-241-4/+2
| | | | Fixes: debbugs:15699
* * lisp/emacs-lisp/lisp-mode.el: Font-lock cl-lib constructs.Stefan Monnier2013-10-081-5/+245
| | | | | | | | | | (lisp-el-font-lock-keywords, lisp-el-font-lock-keywords-1) (lisp-el-font-lock-keywords-2, lisp-cl-font-lock-keywords) (lisp-cl-font-lock-keywords-1, lisp-cl-font-lock-keywords-2): New constants. (lisp-mode-variables): New `elisp' argument. (emacs-lisp-mode): Use it. * lisp/font-lock.el (lisp-font-lock-keywords, lisp-font-lock-keywords-1) (lisp-font-lock-keywords-2): Move to lisp-mode.el.
* * lisp/emacs-lisp/lisp-mode.el (eval-defun-2): Simplify, using lexical-binding.Stefan Monnier2013-10-071-22/+20
|
* lisp/*.el: Silence lexical-binding warnings.Juanma Barranquero2013-08-091-7/+7
|
* lisp/emacs-lisp/lisp-mode.el: Support cl-def* expressions in imenu.Juanma Barranquero2013-08-021-2/+5
|
* Convert symbol prettification into minor mode and global minor mode.Juanma Barranquero2013-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Document new Prettify Symbols mode. * lisp/progmodes/prog-mode.el (prettify-symbols-alist): Rename from `prog-prettify-symbols', and make a local defvar instead of defcustom. (prettify-symbols--keywords): Rename from `prog-prettify-symbols-alist' and make a local defvar. (prettify-symbols--compose-symbol): Rename from `prog--prettify-font-lock-compose-symbol'. (prettify-symbols--make-keywords): Rename from `prog-prettify-font-lock-symbols-keywords' and simplify. (prog-prettify-install): Remove. (prettify-symbols-mode): New minor mode, based on `prog-prettify-install'. (turn-on-prettify-symbols-mode): New function. (global-prettify-symbols-mode): New globalized minor mode. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): * lisp/progmodes/cfengine.el (cfengine3-mode): * lisp/progmodes/perl-mode.el (perl-mode): Don't call `prog-prettify-install'; set `prettify-symbols-alist' instead.
* Add coding cookie to lisp/emacs-lisp/lisp-mode.el.Eli Zaretskii2013-06-151-1/+1
|
* lisp-mode font-lock fox for bug#14574Glenn Morris2013-06-111-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Prettify after setting font-lock-defaults.
* Introduce and use prog-prettify-install.Ted Zlatanov2013-06-051-18/+4
|
* Symbol prettify in prog-mode; added to perl-mode, cfengine3-mode, and ↵Ted Zlatanov2013-06-051-2/+21
| | | | emacs-lisp-mode.
* * lisp/emacs-lisp/lisp-mode.el (eval-sexp-add-defvars): Expand macrosStefan Monnier2013-06-031-0/+1
| | | | | | eagerly. Fixes: debbugs:14422
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit fromStefan Monnier2013-05-291-0/+1
| | | | prog-mode-map.
* * lisp/emacs-lisp/lisp-mode.el (eval-defun-2): Doc fix. Juri Linkov2013-05-061-7/+6
| | | | | | | | (eval-defun-2, eval-defun, eval-last-sexp, eval-last-sexp-1): Doc fix. (emacs-lisp-mode-map): Replace "minibuffer" with "echo area" in the help string. (Bug#12985) Fixes: debbugs:14344
* * lisp/emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): MakeDmitry Gutov2013-03-241-0/+2
| | | | it safe-local.
* Don't use font-lock-syntax-table in lisp modes.Stefan Monnier2013-02-171-8/+4
| | | | | | | | * lisp/font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2): Don't assume all identifier chars have syntax word. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Remove bar-not-symbol. Adjust callers. (lisp-mode-variables): Don't set a font-lock-syntax-table.
* Fixes: debbugs:13556Andreas Schwab2013-01-261-4/+8
| | | | | | * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional parameter BAR-NOT-SYMBOL to control syntax of | for font-lock. (lisp-mode): Pass t for it.
* * lisp-mode.el (emacs-lisp-mode-map): Add native profiler menu entries.Glenn Morris2013-01-191-0/+16
|
* Merge from emacs-24; up to 2012-12-11T09:51:12Z!dmantipov@yandex.ruGlenn Morris2013-01-191-1/+1
|\
| * Doc fixes related to "(declare (indent symbol))" (bug#13450)Glenn Morris2013-01-151-1/+1
| | | | | | | | | | | | | | * doc/lispref/macros.texi (Indenting Macros): Fix order of an indent symbol's arguments. * lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix.
* | Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-1/+1
|\|
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
| |
* | Make eval-defun on a pre-defined defcustom call any :set functionGlenn Morris2012-12-081-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (eval-defun-1): Doc fix. Respect a defcustom's :set function, if appropriate. (eval-defun): Doc fix. * doc/lispref/customize.texi (Variable Definitions): Mention eval-defun on a defcustom calls the :set function when appropriate. * etc/NEWS: Mention this. Fixes: debbugs:109
* | Fix last change.Chong Yidong2012-12-011-22/+23
| | | | | | | | | | | | | | | | * emacs-lisp/lisp-mode.el (lisp-current-defun-name): * progmodes/m4-mode.el (m4-current-defun-name): * progmodes/perl-mode.el (perl-current-defun-name): * textmodes/tex-mode.el (tex-current-defun-name): * textmodes/texinfo.el (texinfo-current-defun-name): Use save-excursion.
* | Modularize add-log-current-defun.Chong Yidong2012-12-011-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Jari Aalto. * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): New. (lisp-mode-variables): Use it. * lisp/progmodes/cc-mode.el (c-common-init): * lisp/progmodes/cperl-mode.el (cperl-mode): Set a value for add-log-current-defun-function. * lisp/progmodes/m4-mode.el (m4-current-defun-name): New function. (m4-mode): Use it. * lisp/progmodes/perl-mode.el (perl-current-defun-name): New. (perl-mode): Use it. * lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode): Use lisp-current-defun-name. * lisp/textmodes/tex-mode.el (tex-current-defun-name): New. (tex-common-initialization): Use it. * lisp/textmodes/texinfo.el (texinfo-current-defun-name): New. (texinfo-mode): Use it. * lisp/vc/add-log.el (add-log-current-defun-function): Doc fix. (add-log-current-defun): Move mode-specific code to other files. (add-log-lisp-like-modes, add-log-c-like-modes) (add-log-tex-like-modes): Variables deleted. Fixes: debbugs:2224
* | Convert several major modes to setq-local.Chong Yidong2012-12-011-32/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs-lisp/lisp-mode.el (lisp-mode-variables, lisp-mode): * progmodes/autoconf.el (autoconf-mode): * progmodes/js.el (js-mode): * progmodes/make-mode.el (makefile-mode, makefile-makepp-mode) (makefile-bsdmake-mode, makefile-imake-mode, makefile-browse): * progmodes/perl-mode.el (perl-mode): * progmodes/sh-script.el (sh-mode, sh-set-shell): * textmodes/css-mode.el (css-mode): * textmodes/sgml-mode.el (html-mode, sgml-mode) (sgml-tags-invisible, sgml-guess-indent): * textmodes/tex-mode.el (tex-common-initialization) (latex-complete-bibtex-keys, tex-shell, tex-main-file) (doctex-mode, plain-tex-mode, latex-mode): * textmodes/texinfo.el (texinfo-mode): Use setq-local.
* | Revamp face-spec-set to be more analogous to setq for faces.Chong Yidong2012-11-251-15/+2
|/ | | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (face-spec-set): Change the third arg to specify whether this function is being called via defface, customize, or a third party. Set the appropriate symbol properties. Clear the override spec if setting via Custom. Initialize face if necessary. (face-spec-recalc): Allow theme faces to completely replace the defface spec, in the same way as custom faces (Bug#8454). * lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save) (custom-face-reset-saved, custom-face-mark-to-reset-standard): Simplify by using the new arg to face-spec-set. * lisp/cus-face.el (custom-declare-face): Move face initialization to face-spec-set. (custom-theme-set-faces): Don't initialize the face name here, as that is now done in face-spec-set. * lisp/emacs-lisp/lisp-mode.el (eval-defun-1): When evaluating defface, reset face-override-spec too, and use custom-declare-face. Fixes: debbugs:4988