1. 14 Sep, 2015 1 commit
    • Alan Mackenzie's avatar
      Elisp mode: Make font-lock and imenu handle escaped characters in symbols · e348a668
      Alan Mackenzie authored
      Fixes debbugs#21449.
      lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
      (lisp--el-match-keyword, lisp-el-font-lock-keywords-1)
      (lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2)
      (lisp-cl-font-lock-keywords-2, lisp-string-in-doc-position-p):
      Insert "\\|\\\\." into regexps which match symbols.
  2. 07 Jul, 2015 1 commit
    • Stefan Monnier's avatar
      Add online-help support to describe types · 59b5723c
      Stefan Monnier authored
      * lisp/help-fns.el (describe-symbol-backends): Move to help-mode.el.
      (describe-symbol): Improve the selection of default.
      * lisp/help-mode.el: Require cl-lib.
      (describe-symbol-backends): Move from help-fns.el.
      (help-make-xrefs): Use it.
      * lisp/emacs-lisp/cl-extra.el (describe-symbol-backends): Add entry
      for types.
      (cl--typedef-regexp): New const.
      (find-function-regexp-alist): Add entry for types.
      (cl-help-type, cl-type-definition): New buttons.
      (cl-find-class): New function.
      (cl-describe-type): New command.
      (cl--describe-class, cl--describe-class-slot)
      (cl--describe-class-slots): New functions, moved from eieio-opt.el.
      * lisp/emacs-lisp/cl-generic.el (cl--generic-method-documentation)
      (cl--generic-all-functions, cl--generic-specializers-apply-to-type-p):
      New functions.  Moved from eieio-opt.el.
      (cl--generic-class-parents): New function, extracted from
      (cl--generic-struct-specializers): Use it.
      * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use pcase-dolist.
      Improve constructor's docstrings.
      (cl-struct-unknown-slot): New error.
      (cl-struct-slot-offset): Use it.
      * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Record the type
      definition in current-load-list.
      * lisp/emacs-lisp/eieio-core.el (eieio--known-slot-names): New var.
      (eieio--add-new-slot): Set it.
      (eieio-defclass-internal): Use new name for current-load-list.
      (eieio-oref): Add compiler-macro to warn about unknown slots.
      * lisp/emacs-lisp/eieio.el (defclass): Update eieio--known-slot-names
      as compile-time as well.  Improve constructor docstrings.
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
      (eieio--help-print-slot, eieio-help-class-slots): Move to cl-extra.el.
      (eieio-class-def): Remove button.
      (eieio-help-constructor): Use new name for load-history element.
      (eieio--specializers-apply-to-class-p, eieio-all-generic-functions)
      (eieio-method-documentation): Move to cl-generic.el.
      (eieio-display-method-list): Use new names.
      * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
      Add "define-linline".
      (lisp-fdefs): Remove "defsubst".
      (el-fdefs): Add "defsubst", "cl-defsubst", and "define-linline".
      * lisp/emacs-lisp/macroexp.el (macroexp--warned): New var.
      (macroexp--warn-and-return): Use it to avoid inf-loops.
      Add `compile-only' argument.
  3. 19 Jun, 2015 1 commit
    • Paul Eggert's avatar
      Improve the optional translation of quotes · c4151ebe
      Paul Eggert authored
      Fix several problems with the recently-added custom variable
      help-quote-translation where the code would quote inconsistently
      in help buffers.  Add support for quoting 'like this', which
      is common in other GNU programs in ASCII environments.  Change
      help-quote-translation to use more mnemonic values: values are now the
      initial quoting char, e.g., (setq help-quote-translation ?`) gets the
      traditional Emacs help-buffer quoting style `like this'.  Change the
      default behavior of substitute-command-keys to match what's done in
      set-locale-environment, i.e., quote ‘like this’ if displayable,
      'like this' otherwise.
      * doc/lispref/help.texi (Keys in Documentation): Document
      new behavior of substitute-command-keys, and document
      * doc/lispref/tips.texi (Documentation Tips):
      Mention the effect of help-quote-translation.
      * etc/NEWS: Mention new behavior of substitute-command-keys,
      and merge help-quote-translation news into it.
      When talking about doc strings, mention new ways to type quotes.
      * lisp/cedet/mode-local.el (overload-docstring-extension):
      Revert my recent change to this function, which shouldn't be
      needed as the result is a doc string.
      * lisp/cedet/mode-local.el (mode-local-print-binding)
      * lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
      * lisp/cus-theme.el (describe-theme-1):
      * lisp/descr-text.el (describe-text-properties-1, describe-char):
      * lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
      * lisp/emacs-lisp/package.el (describe-package-1):
      * lisp/faces.el (describe-face):
      * lisp/help-fns.el (help-fns--key-bindings)
      (help-fns--compiler-macro, help-fns--parent-mode)
      (help-fns--obsolete, help-fns--interactive-only)
      (describe-function-1, describe-variable):
      * lisp/help.el (describe-mode):
      Use substitute-command-keys to ensure a more-consistent quoting
      style in help buffers.
      * lisp/cus-start.el (standard):
      Document new help-quote-translation behavior.
      * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs):
      * lisp/help-mode.el (help-xref-symbol-regexp, help-xref-info-regexp)
      * lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
      * lisp/wid-edit.el (widget-documentation-link-regexp):
      Also match 'foo', in case we're in a help buffer generated when
      help-quote-translation is ?'.
      * src/doc.c: Include disptab.h, for DISP_CHAR_VECTOR.
      (uRSQM1, uRSQM2, LSQM, RSQM): New constants.
      (Fsubstitute_command_keys): Document and implement new behavior.
      (Vhelp_quote_translation): Document new behavior.
  4. 28 May, 2015 1 commit
    • Paul Eggert's avatar
      Support curved quotes in doc strings · 0fd5e659
      Paul Eggert authored
      Emacs's traditional doc string style has been to quote symbols
      `like this'.  This worked well on now-obsolete terminals where
      ` and ' were symmetric quotes, but nowadays curved quotes
      ‘like this’ look better.  Support quoting the new way too.
      * doc/lispref/tips.texi (Documentation Tips): Symbols can be quoted
      ‘like-this’ as well as `like-this'.
      * etc/NEWS: Mention this.
      * lisp/cedet/mode-local.el (overload-docstring-extension)
      (mode-local-print-binding, mode-local-describe-bindings-2):
      * lisp/cus-theme.el (describe-theme-1):
      * lisp/descr-text.el (describe-text-properties-1, describe-char):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
      * lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
      * lisp/emacs-lisp/package.el (describe-package-1):
      * lisp/faces.el (describe-face):
      * lisp/help-fns.el (help-fns--key-bindings)
      (help-fns--compiler-macro, help-fns--parent-mode, help-fns--obsolete):
      (help-fns--interactive-only, describe-function-1):
      * lisp/help.el (describe-mode):
      * lisp/international/mule-cmds.el (describe-input-method)
      * lisp/international/mule-diag.el (describe-character-set)
      (print-coding-system-briefly, list-input-methods)
      Insert curved quotes rather than grave accent and apostrophe.
      * lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
      * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2)
      * lisp/finder.el (finder-font-lock-keywords):
      * lisp/gnus/gnus-art.el (gnus-button-alist):
      * lisp/help-fns.el (help-do-arg-highlight)
      (describe-function-1, describe-variable):
      * lisp/help-mode.el (help-xref-symbol-regexp)
      (help-xref-info-regexp, help-xref-url-regexp):
      * lisp/help.el (describe-mode):
      * lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
      * lisp/wid-edit.el (widget-documentation-link-regexp):
      Parse symbols quoted ‘like-this’ as well as `like-this'.
      * lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
      Add "‘" and "’" to electric-pair-text-pairs.
      (elisp--form-quoted-p): Also allow "‘" as a quoting char.
      (elisp-completion-at-point, elisp--preceding-sexp):
      Also treat "‘" and "’" as quoting chars.
  5. 20 May, 2015 1 commit
    • Oleh Krehel's avatar
      Add let-when-compile macro instead of using pcase-let · 5d752c8a
      Oleh Krehel authored
      * lisp/subr.el (let-when-compile): New let-like macro that makes its
      bindings known to macros like `eval-when-compile' in the body.
      * lisp/emacs-lisp/lisp-mode.el: Change the top-level `pcase-let' to a
        `let-when-compile'. Also comment out the unused lexical var
      The change greatly improves readability, while providing almost the
      same (even shorter) byte code: instead of pre-evaluating 10 variables,
      tossing them into a list, and destructuring that list a full screen
      page later, the variables are simply bound as they are evaluated,
      wrapped individually in `eval-when-compile'.
  6. 21 Apr, 2015 1 commit
    • Stefan Monnier's avatar
      Fix byte-compiler warnings about looking-back. · c9a75a40
      Stefan Monnier authored
      * lisp/vc/log-view.el (log-view-end-of-defun-1):
      * lisp/textmodes/tex-mode.el (latex-forward-sexp-1):
      * lisp/textmodes/reftex-ref.el (reftex-goto-label):
      * lisp/textmodes/bibtex.el (bibtex-insert-kill):
      * lisp/progmodes/sh-script.el (sh--maybe-here-document):
      * lisp/progmodes/ruby-mode.el (ruby-end-of-defun):
      * lisp/progmodes/ada-mode.el (ada-in-numeric-literal-p):
      * lisp/org/org.el (org-insert-heading, org-sort-entries):
      * lisp/org/org-mouse.el (org-mouse-end-headline)
      * lisp/org/org-clock.el (org-clock-cancel):
      * lisp/man.el (Man-default-man-entry):
      * lisp/mail/rmail.el (rmail-get-new-mail, rmail-insert-inbox-text)
      * lisp/mail/footnote.el (Footnote-delete-footnote):
      * lisp/mail/emacsbug.el (report-emacs-bug):
      * lisp/info.el (Info-follow-reference, Info-fontify-node):
      * lisp/info-look.el (info-lookup-guess-custom-symbol):
      * lisp/help-fns.el (help-fns--key-bindings):
      * lisp/files.el (hack-local-variables):
      * lisp/emulation/viper-ex.el (viper-get-ex-token, ex-cmd-complete)
      (viper-get-ex-pat, ex-expand-filsyms, viper-get-ex-file)
      * lisp/emulation/viper-cmd.el (viper-backward-indent):
      * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent):
      * lisp/emacs-lisp/elint.el (elint-get-top-forms):
      * lisp/cus-edit.el (custom-face-edit-value-create):
      * lisp/calendar/todo-mode.el (todo-set-item-priority)
      (todo-filter-items-1, todo-convert-legacy-files)
      (todo-prefix-overlays): Add explicit second arg to looking-back.
  7. 15 Apr, 2015 2 commits
  8. 23 Mar, 2015 3 commits
  9. 21 Mar, 2015 1 commit
  10. 20 Mar, 2015 2 commits
  11. 18 Mar, 2015 1 commit
    • Tassilo Horn's avatar
      Improve dynamic elisp keyword font-locking · 9fdc166e
      Tassilo Horn authored
      * emacs-lisp/byte-run.el (macro-declarations-alist): New
      declaration no-font-lock-keyword.
      (defmacro): Flush font-lock in existing elisp buffers.
      * emacs-lisp/lisp-mode.el (lisp--el-update-after-load)
      (lisp--el-update-macro-regexp, lisp--el-macro-regexp): Delete
      functions and defconst.
      (lisp--el-match-keyword): Rename from lisp--el-match-macro.
      (lisp--el-font-lock-flush-elisp-buffers): New function.
      (lisp-mode-variables): Remove code for updating
      lisp--el-macro-regexp, and add
      lisp--el-font-lock-flush-elisp-buffers to after-load-functions.
  12. 15 Mar, 2015 1 commit
    • Tassilo Horn's avatar
      Font-lock elisp macros/special forms dynamically · 51e7e463
      Tassilo Horn authored
      * emacs-lisp/lisp-mode.el (lisp--el-macro-regexp): New defconst.
      (lisp--el-update-macro-regexp, lisp--el-update-after-load)
      (lisp--el-match-macro): New functions.
      (lisp-mode-variables): Update lisp--el-macro-regexp and add
      lisp--el-update-after-load to after-load-functions.
  13. 09 Feb, 2015 1 commit
    • Leo Liu's avatar
      Add macro pcase-lambda · 751adc4b
      Leo Liu authored
      Fixes: debbugs:19814
      * emacs-lisp/lisp-mode.el (el-kws-re): Include `pcase-lambda'.
      * emacs-lisp/macroexp.el (macroexp-parse-body): New function.
      * emacs-lisp/pcase.el (pcase-lambda): New Macro.
  14. 01 Jan, 2015 2 commits
  15. 18 Nov, 2014 1 commit
    • Leo Liu's avatar
      New macro define-advice · 1148d375
      Leo Liu authored
      * doc/lispref/functions.texi (Advising Named Functions): Document
      * lisp/emacs-lisp/nadvice.el (define-advice): New macro.
      * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Add
      (lisp-font-lock-keywords-1): Add define-advice.
  16. 28 Sep, 2014 1 commit
  17. 27 Sep, 2014 1 commit
    • Stefan Monnier's avatar
      Introduce global-eldoc-mode. Move Elisp-specific code to elisp-mode.el. · e6cfa098
      Stefan Monnier authored
      * 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
      (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-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.
  18. 13 Sep, 2014 1 commit
  19. 19 Jun, 2014 1 commit
    • Robert Brown (tiny change)'s avatar
      * etc/NEWS: New Tramp method "nc". · 96db0055
      Robert Brown (tiny change) authored
      * 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): Use them.
      Fixes: debbugs:9130
  20. 14 May, 2014 1 commit
    • Glenn Morris's avatar
      Add with-file-modes macro, and use it · d63d883a
      Glenn Morris authored
      * 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)
      * 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.
  21. 11 May, 2014 1 commit
  22. 01 May, 2014 1 commit
  23. 24 Apr, 2014 1 commit
  24. 22 Apr, 2014 1 commit
  25. 05 Apr, 2014 1 commit
  26. 17 Mar, 2014 1 commit
    • Dmitry Gutov's avatar
      Fix debbugs#16971 · 4f8aeb84
      Dmitry Gutov authored
      * 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.
  27. 10 Feb, 2014 1 commit
  28. 30 Jan, 2014 1 commit
    • Glenn Morris's avatar
      Replace refs to obsolete alias `turn-on-eldoc-mode' with `eldoc-mode' · ad78f432
      Glenn Morris authored
      * lisp/hexl.el (hexl-mode-hook):
      * lisp/ielm.el (ielm-mode-hook):
      * lisp/emacs-lisp/lisp-mode.el (emacs-lisp-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.
  29. 23 Jan, 2014 1 commit
  30. 03 Jan, 2014 1 commit
  31. 01 Jan, 2014 1 commit
  32. 28 Dec, 2013 1 commit
  33. 27 Dec, 2013 1 commit
  34. 26 Dec, 2013 1 commit
    • João Távora's avatar
      Make Electric Pair mode smarter/more useful: · 3b8d5131
      João Távora authored
      * 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
      * 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
  35. 19 Dec, 2013 1 commit
    • Juri Linkov's avatar
      * lisp/simple.el (eval-expression-print-format): Don't check for · b41594fd
      Juri Linkov authored
      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