summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Minor improvement in map-elt.Nicolas Petton2015-04-241-2/+11
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/map.el (map-elt): Do not use `ignore-errors' when doing a lookup in arrays, but check the boundaries of the array instead. * test/automated/map-tests.el: Adds a test for `map-elt' with arrays and a negative integer as key.
| * * lisp/emacs-lisp/map.el (map-into): Better error message.Nicolas Petton2015-04-181-1/+1
| |
| * * lisp/emacs-lisp/map.el: Removes byte-compilation warnings.Nicolas Petton2015-04-181-4/+4
| |
| * Throw an error when converting a map into an unknown map typeNicolas Petton2015-04-181-1/+2
| | | | | | | | | | * lisp/emacs-lisp/map.el (map-into): Throw an error if type is not valid. * test/automated/map-test.el: Add a regression test.
| * New library map.el similar to seq.el but for mapping data structures.Nicolas Petton2015-04-181-0/+270
| | | | | | | | | | * test/automated/map-test.el: New file. * lisp/emacs-lisp/map.el: New file.
* | Generate curved quotes in ert docPaul Eggert2015-06-021-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert--print-test-for-ewoc) (ert-results-mode-menu) (ert-results-pop-to-backtrace-for-test-at-point) (ert-results-pop-to-messages-for-test-at-point) (ert-results-pop-to-should-forms-for-test-at-point) (ert-describe-test): Quote ‘like this’, not `like this', when generating doc strings and the like. * test/automated/ert-x-tests.el (ert-test-describe-test): Allow quoting ‘like this’.
* | * lisp/emacs-lisp/package.el: Don't load from parent dirArtur Malabarba2015-05-291-3/+4
| | | | | | | | | | (package-load-all-descriptors): Don't load descriptors from directories above the package directories.
* | ; Auto-commit of loaddefs files.Glenn Morris2015-05-281-1/+1
| |
* | A few more doc string fixes (Bug#20385)Paul Eggert2015-05-282-5/+5
| |
* | Fix minor quoting problems in doc stringsPaul Eggert2015-05-281-1/+1
| | | | | | | | | | | | Most of these fixes involve escaping grave accents that are actually intended to be grave accents, not left quotes. (Bug#20385)
* | Support curved quotes in doc stringsPaul Eggert2015-05-285-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (Bug#20385) * 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) (eieio-help-constructor): * 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): * lisp/international/mule-cmds.el (describe-input-method) (describe-language-environment): * lisp/international/mule-diag.el (describe-character-set) (print-coding-system-briefly, list-input-methods) (list-input-methods-1): 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) (checkdoc-proper-noun-region-engine): * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-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.
* | * lisp/emacs-lisp/package.el: Don't erase tags on refreshArtur Malabarba2015-05-271-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | (package-menu--post-refresh): Call `tabulated-list-print' with the UPDATE argument. This only affects the refresh action, the revert action still erases tags. (package-menu-get-status): Change `assq' to `assoc'. (package-menu--mark-upgrades-1): New function. (package-menu--mark-upgrades-pending): New variable. (package-menu-mark-upgrades): Use them to delay marking until after refresh is done. (package-menu--post-refresh): Call mark-upgrades-1 if mark-upgrades-pending is non-nil.
* | * lisp/emacs-lisp/tabulated-list.el: Don't sort without sorterArtur Malabarba2015-05-261-1/+2
| | | | | | | | (tabulated-list-print): Don't sort if sorter is nil
* | (cl-generic-define-method): Side effects are evil (bug#20644)Stefan Monnier2015-05-251-2/+4
| | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Don't reuse cons-cells that might be used as keys in an `equal' hash-table.
* | * lisp/emacs-lisp/cl-macs.el (cl-tagbody): Scope cl--tagbody-alistStefan Monnier2015-05-251-1/+2
| | | | | | | | Fixes: debbugs:20639
* | * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstringStefan Monnier2015-05-241-24/+29
| | | | | | | | (pcase-let): Document the behavior in case the pattern doesn't match.
* | * lisp/emacs-lisp/tabulated-list.el: New optional print methodArtur Malabarba2015-05-241-9/+45
| | | | | | | | | | | | | | | | | | | | | | (tabulated-list-print): New optional argument, UPDATE. If non-nil, the list is printed by only adding and deleting the changed entries, instead of erasing the whole buffer. This method is much faster when few or no entries have changed. * doc/lispref/modes.texi (Tabulated List Mode): Document it. * etc/NEWS: Document it.
* | * lisp/emacs-lisp/tabulated-list.el: Improve printingArtur Malabarba2015-05-241-24/+33
| | | | | | | | | | | | (tabulated-list--get-sorter): New function. (tabulated-list-print): Restore window-line when remember-pos is passed and optimize away the `nreverse'.
* | Replace gui-method macros with cl-generic with &contextStefan Monnier2015-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (gui-method--name, gui-method, gui-method-define) (gui-method-declare, gui-call): Remove. (frame-creation-function): Use cl-defgeneric. (make-frame): Adjust callers. * lisp/menu-bar.el (menu-bar-edit-menu): Use gui-backend-selection-exists-p. * lisp/select.el (x-get-clipboard): Use gui-backend-get-selection. (gui-backend-get-selection): New cl-generic to replace gui-get-selection method. (gui-backend-set-selection): New cl-generic to replace gui-set-selection method. (gui-selection-owner-p): New cl-generic to replace gui-selection-owner-p method. (gui-backend-selection-exists-p): New cl-generic to replace gui-selection-exists-p method. Adjust all callers. * lisp/server.el (server-create-window-system-frame): Don't ignore window-system spec even when unsupported. * lisp/simple.el (deactivate-mark): Use new gui-backend-* functions. * lisp/startup.el (handle-args-function, window-system-initialization): Use cl-defgeneric. (command-line): Adjust calls accordingly. * lisp/term/ns-win.el (ns-window-system-initialization): Turn into a window-system-initialization method. (handle-args-function, frame-creation-function): Use cl-defmethod. (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) (gui-get-selection): Use cl-defmethod on the new functions instead. * lisp/term/pc-win.el (w16-get-selection-value): Turn into a gui-backend-get-selection method. (gui-selection-exists-p, gui-selection-owner-p, gui-set-selection): Use cl-defmethod on the new functions instead. (msdos-window-system-initialization): Turn into a window-system-initialization method. (frame-creation-function, handle-args-function): Use cl-defmethod. * lisp/term/w32-win.el (w32-window-system-initialization): Turn into a window-system-initialization method. (handle-args-function, frame-creation-function): Use cl-defmethod. (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) (gui-get-selection): Use cl-defmethod on the new functions instead. * lisp/term/x-win.el (x-window-system-initialization): Turn into a window-system-initialization method. (handle-args-function, frame-creation-function): Use cl-defmethod. (gui-set-selection, gui-selection-owner-p, gui-selection-exists-p) (gui-get-selection): Use cl-defmethod on the new functions instead. * lisp/term/xterm.el (xterm--set-selection): Turn into a gui-backend-set-selection method. * src/nsselect.m (Fns_selection_exists_p): Remove unused arg `terminal'. (Fns_selection_owner_p): Remove unused arg `terminal'. (Fns_get_selection): Remove unused args `time_stamp' and `terminal'.
* | * lisp/emacs-lisp/package.el: Always update selected-packagesArtur Malabarba2015-05-231-5/+17
| | | | | | | | | | | | | | | | (package--update-selected-packages): New function. (package-menu-execute): Use it before starting the transaction, this way the list of selected packages is updated even when the transaction fails. (package-menu--perform-transaction): Don't edit selected-packages.
* | * lisp/emacs-lisp/package.el (package-selected-packages): Fix docArtur Malabarba2015-05-221-1/+1
| |
* | Change defgeneric so it doesn't completely redefine the functionStefan Monnier2015-05-211-17/+26
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-define): Don't throw away previously defined methods. (cl-generic-define-method): Let-bind purify-flag instead of using `fset'. (cl--generic-prefill-dispatchers): Only define during compilation. (cl-method-qualifiers): Remove redundant alias. (help-fns-short-filename): Silence byte-compiler. * test/automated/cl-generic-tests.el: Adjust to new defgeneric semantics.
* | (package-menu-execute): Remove reference to remove-dupsArtur Malabarba2015-05-211-3/+4
| |
* | Don't quote nil and t in doc stringsPaul Eggert2015-05-218-12/+12
| | | | | | | | | | This is as per "Tips for Documentation Strings" in the elisp manual. For consistency, do the same in diagnostics and comments.
* | * lisp/emacs-lisp/package.el: Fix selected-package logicArtur Malabarba2015-05-211-6/+7
| | | | | | | | | | | | (package-menu-execute): Mark as selected all non-upgrade packages being installed. (package-menu--perform-transaction): Don't mark anything.
* | * lisp/emacs-lisp/package.el: Mode-line progress reportArtur Malabarba2015-05-211-13/+29
| | | | | | | | | | (package-menu--transaction-status): New variable. (package-menu-mode, package-menu--perform-transaction): Use it.
* | * lisp/emacs-lisp/package.el: Better transaction messagesArtur Malabarba2015-05-211-29/+50
| | | | | | | | | | | | | | (package-menu--partition-transaction): New function. (package-menu--prompt-transaction-p, package-menu-execute): Use it. (package-menu--perform-transaction): Don't do any messaging.
* | * lisp/emacs-lisp/package.el: Revert async package transactionsArtur Malabarba2015-05-211-63/+32
| | | | | | | | | | | | | | (package-menu-async): Update doc. (package-install-from-archive, package-download-transaction) (package-install, package-menu--perform-transaction) (package-menu-execute): Remove asynchronous functionality.
* | Improve parameter nameBozhidar Batsov2015-05-201-3/+3
| |
* | Add new inline function `hash-table-empty-p'Bozhidar Batsov2015-05-201-0/+4
| |
* | Don't require help-fns when not neededPaul Eggert2015-05-204-7/+0
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/autoload.el, lisp/emacs-lisp/advice.el: * lisp/emacs-lisp/elint.el: Don't require help-fns at the top level. * lisp/emacs-lisp/advice.el (ad-arglist): * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Don't require help-fns. (Bug#17001)
* | Add let-when-compile macro instead of using pcase-letOleh Krehel2015-05-201-242/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 `el-kws-re'. 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'.
* | * lisp/emacs-lisp/package.el: "Delete" button in Help bufferArtur Malabarba2015-05-201-1/+16
| | | | | | | | | | (package-delete-button-action): New function. (describe-package-1): Add Delete button.
* | * lisp/emacs-lisp/package.el: Better dependency descriptionArtur Malabarba2015-05-201-10/+28
| | | | | | | | | | | | | | (package--used-elsewhere-p): New optional arg, ALL, and return package-desc objects instead of names. (package-delete): Update accordingly. (describe-package-1): Describe which packages require the package.
* | Fix minor quoting problems in doc stringsPaul Eggert2015-05-193-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were glitches regardless of how or whether we tackle the problem of grave accent in doc strings. * lisp/calc/calc-aent.el (math-restore-placeholders): * lisp/ido.el (ido-ignore-buffers, ido-ignore-files): * lisp/leim/quail/cyrillic.el ("bulgarian-alt-phonetic"): * lisp/leim/quail/hebrew.el ("hebrew-new") ("hebrew-biblical-sil"): * lisp/leim/quail/thai.el ("thai-kesmanee"): * lisp/progmodes/idlw-shell.el (idlwave-shell-file-name-chars): Used curved quotes to avoid ambiguities like ‘`''’ in doc strings. * lisp/calendar/calendar.el (calendar-month-abbrev-array): * lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-cache-flush-fcn): * lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass): * lisp/cedet/semantic/tag.el (semantic-tag-copy) (semantic-tag-components): * lisp/cedet/srecode/cpp.el (srecode-semantic-handle-:cpp): * lisp/cedet/srecode/texi.el (srecode-texi-texify-docstring): * lisp/emacs-lisp/byte-opt.el (byte-optimize-all-constp): * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): * lisp/emacs-lisp/generator.el (iter-next): * lisp/gnus/gnus-art.el (gnus-treat-strip-list-identifiers) (gnus-article-mode-syntax-table): * lisp/net/rlogin.el (rlogin-directory-tracking-mode): * lisp/net/soap-client.el (soap-wsdl-get): * lisp/net/telnet.el (telnet-mode): * lisp/org/org-compat.el (org-number-sequence): * lisp/org/org.el (org-remove-highlights-with-change) (org-structure-template-alist): * lisp/org/ox-html.el (org-html-link-org-files-as-html): * lisp/play/handwrite.el (handwrite-10pt, handwrite-11pt) (handwrite-12pt, handwrite-13pt): * lisp/progmodes/f90.el (f90-mode, f90-abbrev-start): * lisp/progmodes/idlwave.el (idlwave-mode, idlwave-check-abbrev): * lisp/progmodes/verilog-mode.el (verilog-tool) (verilog-string-replace-matches, verilog-preprocess) (verilog-auto-insert-lisp, verilog-auto-insert-last): * lisp/textmodes/makeinfo.el (makeinfo-options): * src/font.c (Ffont_spec): Fix minor quoting problems in doc strings, e.g., missing quote, ``x'' where `x' was meant, etc. * lisp/erc/erc-backend.el (erc-process-sentinel-2): Fix minor quoting problem in other string. * lisp/leim/quail/ethiopic.el ("ethiopic"): * lisp/term/tvi970.el (tvi970-set-keypad-mode): Omit unnecessary quotes. * lisp/faces.el (set-face-attribute, set-face-underline) (set-face-inverse-video, x-create-frame-with-faces): * lisp/gnus/gnus-group.el (gnus-group-nnimap-edit-acl): * lisp/mail/supercite.el (sc-attribs-%@-addresses) (sc-attribs-!-addresses, sc-attribs-<>-addresses): * lisp/net/tramp.el (tramp-methods): * lisp/recentf.el (recentf-show-file-shortcuts-flag): * lisp/textmodes/artist.el (artist-ellipse-right-char) (artist-ellipse-left-char, artist-vaporize-fuzziness) (artist-spray-chars, artist-mode, artist-replace-string) (artist-put-pixel, artist-text-see-thru): * lisp/vc/ediff-util.el (ediff-submit-report): * lisp/vc/log-edit.el (log-edit-changelog-full-paragraphs): Use double-quotes rather than TeX markup in doc strings. * lisp/skeleton.el (skeleton-pair-insert-maybe): Reword to avoid the need for grave accent and apostrophe. * lisp/xt-mouse.el (xterm-mouse-tracking-enable-sequence): Don't use grave and acute accents to quote.
* | * emacs-lisp/generator.el (cps--gensym, cps--transform-1): Silence compilerStefan Monnier2015-05-191-4/+4
| |
* | Further lisp-complete-symbol related cleanup.Glenn Morris2015-05-181-2/+3
| | | | | | | | | | * lisp/emacs-lisp/lisp.el (lisp-complete-symbol): Unadvertise non-functional argument. Replace obsolete alias.
* | Allow checkdoc to be called in batchOleh Krehel2015-05-181-3/+6
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-error): When `noninteractive' is non-nil, echo the error with `warn'. How it can be used in -batch: (with-current-buffer (find-file "checkdoc.el") (checkdoc-current-buffer t))
* | Removes the predicate from lisp-complete-symbol (Bug#20456)Nicolas Petton2015-05-161-9/+6
| | | | | | | | | | * lisp/emacs-lisp/lisp.el (lisp-complete-symbol): Do not use predicate and remove it from the docstring.
* | * lisp/emacs-lisp/tabulated-list.el: Don't error on nil header-stringArtur Malabarba2015-05-161-10/+14
| | | | | | | | | | | | | | | | | | | | (tabulated-list-init-header): Document new behavior. (tabulated-list-print-fake-header): No nothing if `tabulated-list--header-string' is nil. (tabulated-list--header-string): Add a docstring. * doc/lispref/modes.texi (Tabulated List Mode): Document it. * etc/NEWS: Document it.
* | Revert "Fix cps--gensym"Leo Liu2015-05-161-1/+1
| | | | | | | | | | * lisp/emacs-lisp/generator.el (cps--gensym): Revert commit fbda511ab8069d0115eafca411a43353b85431b1 on 2015-05-14.
* | * lisp/emacs-lisp/package.el: Don't ensure-init during startupArtur Malabarba2015-05-151-2/+11
| | | | | | | | | | (package--init-file-ensured): New variable. (package-initialize, package--ensure-init-file): Use it.
* | * lisp/emacs-lisp/package.el: Be more careful with the init fileArtur Malabarba2015-05-151-2/+7
| | | | | | | | | | | | (package--ensure-init-file): Check that user-init-file is set, exists, is readable, and is writable. (Bug#20584) Also expand the docstring.
* | Fix cps--gensymLeo Liu2015-05-141-1/+1
| | | | | | | | * lisp/emacs-lisp/generator.el (cps--gensym): Fix.
* | Fix bootstrap (void function cl-member).Glenn Morris2015-05-132-3/+6
| | | | | | | | | | * lisp/emacs-lisp/cl-lib.el: Load cl-seq if no cl-loaddefs file. * lisp/emacs-lisp/cl-seq.el: Provide a feature.
* | * lisp/loadup.el ("emacs-lisp/cl-generic"): PreloadStefan Monnier2015-05-133-15/+41
| | | | | | | | | | | | | | | | | | | | | | * src/lisp.mk (lisp): Add emacs-lisp/cl-generic.elc. * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Avoid defalias for closures which are not immutable. (cl--generic-prefill-dispatchers): New macro. Use it to prefill the dispatchers table with various entries. * lisp/emacs-lisp/ert.el (emacs-lisp-mode-hook): * lisp/emacs-lisp/seq.el (emacs-lisp-mode-hook): Use add-hook.
* | Improve the seq pcase pattern and the `seq-let' macroNicolas Petton2015-05-121-32/+23
| | | | | | | | | | | | * lisp/emacs-lisp/seq.el: The pcase pattern now matches only if the object is a sequence, and binds each element of ARGS to the corresponding element of the sequence.
* | * lisp/emacs-lisp/chart.el (chart-axis-draw): Replace obsolete alias.Glenn Morris2015-05-111-2/+2
| |
* | * lisp/emacs-lisp/cl-generic.el: Add dispatch on &context argumentsStefan Monnier2015-05-121-114/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | (cl--generic-mandatory-args): Remove. (cl--generic-split-args): New function. (cl-generic-define, cl--generic-lambda): Use it. (cl-generic-define-method): Use it as well, and add support for context args. (cl--generic-get-dispatcher): Handle &context dispatch. (cl--generic-cache-miss): `dispatch-arg' can now be a context expression. (cl--generic-dispatchers): Pre-fill. * test/automated/cl-generic-tests.el (sm-generic-test-12-context): New test.
* | New version of `seq-let' based on a pcase patternNicolas Petton2015-05-101-23/+81
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-let): Define the macro in terms of a pcase pattern if `pcase-defmacro' is defined (Emacs>=25.1).