summaryrefslogtreecommitdiff
path: root/lisp/subr.el
Commit message (Collapse)AuthorAgeFilesLines
* Prefer directed to neutral quotesPaul Eggert2015-08-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer directed to neutral quotes in docstings and diagnostics. In docstrings, escape apostrophes that would otherwise be translated to curved quotes using the newer, simpler rules. * admin/unidata/unidata-gen.el (unidata-gen-table): * lisp/align.el (align-region): * lisp/allout.el (allout-mode, allout-solicit-alternate-bullet): * lisp/bookmark.el (bookmark-default-annotation-text): * lisp/calc/calc-aent.el (math-read-if, math-read-factor): * lisp/calc/calc-lang.el (math-read-giac-subscr) (math-read-math-subscr): * lisp/calc/calc-misc.el (report-calc-bug): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-read-parse-table-part): * lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules): * lisp/cedet/semantic/complete.el (semantic-displayor-show-request): * lisp/dabbrev.el (dabbrev-expand): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emacs-lisp/lisp-mnt.el (lm-verify): * lisp/emulation/viper-cmd.el (viper-toggle-search-style): * lisp/erc/erc-button.el (erc-nick-popup): * lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login): * lisp/eshell/em-dirs.el (eshell/cd): * lisp/eshell/em-glob.el (eshell-glob-regexp): * lisp/eshell/em-pred.el (eshell-parse-modifiers): * lisp/eshell/esh-arg.el (eshell-parse-arguments): * lisp/eshell/esh-opt.el (eshell-show-usage): * lisp/files-x.el (modify-file-local-variable): * lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer) (filesets-update-pre010505): * lisp/find-cmd.el (find-generic, find-to-string): * lisp/gnus/auth-source.el (auth-source-netrc-parse-entries): * lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer) (gnus-agent-fetch-headers): * lisp/gnus/gnus-int.el (gnus-start-news-server): * lisp/gnus/gnus-registry.el: (gnus-registry--split-fancy-with-parent-internal): * lisp/gnus/gnus-score.el (gnus-summary-increase-score): * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): * lisp/gnus/gnus-topic.el (gnus-topic-rename): * lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days): * lisp/gnus/nnmairix.el (nnmairix-widget-create-query): * lisp/gnus/spam.el (spam-check-blackholes): * lisp/mail/feedmail.el (feedmail-run-the-queue): * lisp/mpc.el (mpc-playlist-rename): * lisp/net/ange-ftp.el (ange-ftp-shell-command): * lisp/net/mairix.el (mairix-widget-create-query): * lisp/net/tramp-cache.el: * lisp/obsolete/otodo-mode.el (todo-more-important-p): * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): * lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region): * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region): * lisp/org/ob-core.el (org-babel-goto-named-src-block) (org-babel-goto-named-result): * lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap): * lisp/org/ob-ref.el (org-babel-ref-resolve): * lisp/org/org-agenda.el (org-agenda-prepare): * lisp/org/org-bibtex.el (org-bibtex-fields): * lisp/org/org-clock.el (org-clock-notify-once-if-expired) (org-clock-resolve): * lisp/org/org-feed.el (org-feed-parse-atom-entry): * lisp/org/org-habit.el (org-habit-parse-todo): * lisp/org/org-mouse.el (org-mouse-popup-global-menu) (org-mouse-context-menu): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/org/ox.el (org-export-async-start): * lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question) (dun-rooms, dun-endgame-questions): * lisp/progmodes/ada-mode.el (ada-goto-matching-start): * lisp/progmodes/ada-xref.el (ada-find-executable): * lisp/progmodes/antlr-mode.el (antlr-options-alists): * lisp/progmodes/flymake.el (flymake-parse-err-lines) (flymake-start-syntax-check-process): * lisp/progmodes/python.el (python-define-auxiliary-skeleton): * lisp/progmodes/sql.el (sql-comint): * lisp/progmodes/verilog-mode.el (verilog-load-file-at-point): * lisp/server.el (server-get-auth-key): * lisp/subr.el (version-to-list): * lisp/textmodes/reftex-ref.el (reftex-label): * lisp/textmodes/reftex-toc.el (reftex-toc-rename-label): * lisp/vc/ediff-diff.el (ediff-same-contents): * lisp/vc/vc-cvs.el (vc-cvs-mode-line-string): * test/automated/tramp-tests.el (tramp-test33-asynchronous-requests): Use directed rather than neutral quotes in diagnostics.
* More-conservative ‘format’ quote restylingPaul Eggert2015-08-231-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of restyling curved quotes for every call to ‘format’, create a new function ‘format-message’ that does the restyling, and using the new function instead of ‘format’ only in contexts where this seems appropriate. Problem reported by Dmitry Gutov and Andreas Schwab in: http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00826.html http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00827.html * doc/lispref/commands.texi (Using Interactive): * doc/lispref/control.texi (Signaling Errors, Signaling Errors): * doc/lispref/display.texi (Displaying Messages, Progress): * doc/lispref/elisp.texi: * doc/lispref/help.texi (Keys in Documentation): * doc/lispref/minibuf.texi (Minibuffer Misc): * doc/lispref/strings.texi (Formatting Strings): * etc/NEWS: Document the changes. * lisp/abbrev.el (expand-region-abbrevs): * lisp/apropos.el (apropos-library): * lisp/calc/calc-ext.el (calc-record-message) (calc-user-function-list): * lisp/calc/calc-help.el (calc-describe-key, calc-full-help): * lisp/calc/calc-lang.el (math-read-big-balance): * lisp/calc/calc-store.el (calc-edit-variable): * lisp/calc/calc-units.el (math-build-units-table-buffer): * lisp/calc/calc-yank.el (calc-edit-mode): * lisp/calendar/icalendar.el (icalendar-export-region) (icalendar--add-diary-entry): * lisp/cedet/mode-local.el (mode-local-print-binding) (mode-local-describe-bindings-2): * lisp/cedet/semantic/complete.el (semantic-completion-message): * lisp/cedet/semantic/edit.el (semantic-parse-changes-failed): * lisp/cedet/semantic/wisent/comp.el (wisent-log): * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report): * lisp/descr-text.el (describe-text-properties-1, describe-char): * lisp/dframe.el (dframe-message): * lisp/dired-aux.el (dired-query): * lisp/emacs-lisp/byte-opt.el (byte-compile-log-lap-1): * lisp/emacs-lisp/bytecomp.el (byte-compile-log) (byte-compile-log-file, byte-compile-warn, byte-compile-form): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use) (cconv-analyze-form): * lisp/emacs-lisp/check-declare.el (check-declare-warn): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): * lisp/emacs-lisp/edebug.el (edebug-format): * lisp/emacs-lisp/eieio-core.el (eieio-oref): * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message) (eldoc-message): * lisp/emacs-lisp/elint.el (elint-file, elint-log): * lisp/emacs-lisp/find-func.el (find-function-library): * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/nadvice.el (advice--make-docstring): * lisp/emacs-lisp/package.el (package-compute-transaction) (package-install-button-action, package-delete-button-action) (package-menu--list-to-prompt): * lisp/emacs-lisp/timer.el (timer-event-handler): * lisp/emacs-lisp/warnings.el (lwarn, warn): * lisp/emulation/viper-cmd.el: (viper-toggle-parse-sexp-ignore-comments) (viper-kill-buffer, viper-brac-function): * lisp/emulation/viper-macs.el (viper-record-kbd-macro): * lisp/facemenu.el (facemenu-add-new-face): * lisp/faces.el (face-documentation, read-face-name) (face-read-string, read-face-font, describe-face): * lisp/files.el (find-alternate-file, hack-local-variables) (hack-one-local-variable--obsolete, write-file) (basic-save-buffer, delete-directory): * lisp/format.el (format-write-file, format-find-file) (format-insert-file): * lisp/help-fns.el (help-fns--key-bindings) (help-fns--compiler-macro, help-fns--obsolete) (help-fns--interactive-only, describe-function-1) (describe-variable): * lisp/help.el (describe-mode): * lisp/info-xref.el (info-xref-output): * lisp/info.el (Info-virtual-index-find-node) (Info-virtual-index, info-apropos): * lisp/international/kkc.el (kkc-error): * lisp/international/mule-cmds.el: (select-safe-coding-system-interactively) (select-safe-coding-system, describe-input-method): * lisp/international/mule-conf.el (code-offset): * lisp/international/mule-diag.el (describe-character-set) (list-input-methods-1): * lisp/international/quail.el (quail-error): * lisp/minibuffer.el (minibuffer-message): * lisp/mpc.el (mpc--debug): * lisp/msb.el (msb--choose-menu): * lisp/net/ange-ftp.el (ange-ftp-message): * lisp/net/gnutls.el (gnutls-message-maybe): * lisp/net/newst-backend.el (newsticker--sentinel-work): * lisp/net/newst-treeview.el (newsticker--treeview-load): * lisp/net/nsm.el (nsm-query-user): * lisp/net/rlogin.el (rlogin): * lisp/net/soap-client.el (soap-warning): * lisp/net/tramp.el (tramp-debug-message): * lisp/nxml/nxml-outln.el (nxml-report-outline-error): * lisp/nxml/nxml-parse.el (nxml-parse-error): * lisp/nxml/rng-cmpct.el (rng-c-error): * lisp/nxml/rng-match.el (rng-compile-error): * lisp/nxml/rng-uri.el (rng-uri-error): * lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer): * lisp/org/org-ctags.el: (org-ctags-ask-rebuild-tags-file-then-find-tag): * lisp/proced.el (proced-log): * lisp/progmodes/ebnf2ps.el (ebnf-log): * lisp/progmodes/flymake.el (flymake-log): * lisp/progmodes/vhdl-mode.el (vhdl-warning-when-idle): * lisp/replace.el (occur-1): * lisp/simple.el (execute-extended-command) (undo-outer-limit-truncate, define-alternatives): * lisp/startup.el (command-line): * lisp/subr.el (error, user-error, add-to-list): * lisp/tutorial.el (tutorial--describe-nonstandard-key) (tutorial--find-changed-keys): * src/callint.c (Fcall_interactively): * src/editfns.c (Fmessage, Fmessage_box): Restyle the quotes of format strings intended for use as a diagnostic, when restyling seems appropriate. * lisp/subr.el (format-message): New function. * src/doc.c (Finternal__text_restyle): New function. (syms_of_doc): Define it.
* Use curved quotes in core elisp diagnosticsPaul Eggert2015-08-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the core elisp files, use curved quotes in diagnostic formats, so that they follow user preference as per ‘text-quoting-style’ rather than being hard-coded to quote `like this'. * lisp/abbrev.el (expand-region-abbrevs): * lisp/button.el (button-category-symbol, button-put) (make-text-button): * lisp/cus-start.el: * lisp/custom.el (custom-add-dependencies, custom-check-theme) (custom--sort-vars-1, load-theme): * lisp/emacs-lisp/byte-run.el (defun, defsubst): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric) (cl-generic-generalizers): * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/nadvice.el (advice--make-docstring) (advice--make, define-advice): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag): * lisp/emacs-lisp/timer.el (timer-event-handler): * lisp/env.el (setenv): * lisp/facemenu.el (facemenu-add-new-face) (facemenu-add-new-color): * lisp/faces.el (face-documentation, read-face-name) (face-read-string, read-face-font, face-spec-set-match-display) (read-color, x-resolve-font-name): * lisp/files.el (locate-user-emacs-file, find-alternate-file) (set-auto-mode, hack-local-variables) (hack-one-local-variable--obsolete) (dir-locals-set-directory-class, write-file) (basic-save-buffer, delete-directory, copy-directory) (recover-session, recover-session-finish, insert-directory) (file-modes-char-to-who, file-modes-symbolic-to-number) (move-file-to-trash): * lisp/font-lock.el (font-lock-fontify-buffer): * lisp/format.el (format-write-file, format-find-file) (format-insert-file): * lisp/frame.el (get-device-terminal, select-frame-by-name): * lisp/fringe.el (fringe--check-style): * lisp/help.el (describe-minor-mode-from-indicator): * lisp/image.el (image-type): * lisp/international/fontset.el (x-must-resolve-font-name): * lisp/international/mule-cmds.el (prefer-coding-system) (select-safe-coding-system-interactively) (select-safe-coding-system, activate-input-method) (toggle-input-method, describe-current-input-method): * lisp/international/mule-conf.el (code-offset): * lisp/mouse.el (minor-mode-menu-from-indicator): * lisp/replace.el (query-replace-read-from) (occur-after-change-function, occur-1): * lisp/scroll-bar.el (scroll-bar-columns): * lisp/simple.el (execute-extended-command) (undo-outer-limit-truncate, compose-mail, set-variable) (choose-completion-string, define-alternatives): * lisp/startup.el (site-run-file, tty-handle-args, ) (command-line, command-line-1): * lisp/subr.el (noreturn, define-error, add-to-list) (read-char-choice): * lisp/term/common-win.el (x-handle-xrm-switch) (x-handle-name-switch, x-handle-args): * lisp/term/x-win.el (x-handle-parent-id, x-handle-smid): Use curved quotes in diagnostics. * lisp/international/mule.el (find-auto-coding): Use " to quote in a diagnostic, to be consistent with the rest of this file.
* ; Do not overwrite preexisting contents of unread-command-eventsDavid Kastrup2015-08-041-1/+2
|
* Fix infinite loop in delete-consecutive-dupsShigeru Fukaya2015-07-261-6/+6
| | | | | | * lisp/subr.el (delete-consecutive-dups): Work even if the last element is nil (Bug#20588). Avoid rescan of a circular list in deletion of last element.
* Fix delete-dups bug on long listsAri Roponen2015-07-161-2/+2
| | | | | * lisp/subr.el (delete-dups): Don't mistakenly keep some dups when applied to long lists.
* In strings, prefer plain ` and ' to \` and \'Paul Eggert2015-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-insert-listified): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): * lisp/ls-lisp.el (ls-lisp-UCA-like-collation) (ls-lisp-string-lessp): * lisp/menu-bar.el (menu-bar-open): * lisp/obsolete/otodo-mode.el (todo-top-priorities): * lisp/progmodes/compile.el (compile): * lisp/progmodes/etags.el (tags-loop-scan): * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation): * lisp/subr.el (posn-actual-col-row): * lisp/term/pc-win.el (x-list-fonts): * lisp/textmodes/texinfmt.el (texinfmt-version): * lisp/textmodes/texnfo-upd.el (texinfo-master-menu): * lisp/time.el (display-time-world-list): * lisp/tmm.el (tmm-menubar): * src/buffer.c (syms_of_buffer): * src/fileio.c (syms_of_fileio): Omit unnecessary and confusing backslash before quote. * lisp/erc/erc.el (erc-cmd-LASTLOG): * lisp/progmodes/flymake.el (flymake-fix-file-name): * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p): Fix string that was intended to escape a backslash and not a quote.
* * lisp/subr.el (remove-from-invisibility-spec): Handle the t caseStefan Monnier2015-06-241-3/+4
| | | | | * lisp/subr.el (remove-from-invisibility-spec): Make sure `element' is visible even if it's not yet in buffer-invisibility-spec (bug#20468).
* Check for an input event before showing a dialog box. (Bug#20813)Glenn Morris2015-06-231-0/+1
| | | | | | * lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Check last-input-event as well as last-nonmenu-event.
* Add new function string-greaterpNicolas Petton2015-06-041-0/+8
| | | | | | | | * lisp/subr.el (string-greaterp): New function. Also aliased to `string>'. * test/automated/subr-tests.el (string-comparison-test): Add unit tests for `string>'and `string<'. * src/fns.c (string-lessp): Better docstring.
* Add let-when-compile macro instead of using pcase-letOleh Krehel2015-05-201-0/+13
| | | | | | | | | | | | | | | * 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/subr.el (delete-dups): Pre-size the hashtable.Stefan Monnier2015-05-061-15/+15
|
* lisp/subr.el (delete-dups): Avoid nreverse.Oleh Krehel2015-05-061-6/+9
|
* * lisp/subr.el (delete-dups): Make it destructive again.Artur Malabarba2015-05-061-3/+3
|
* lisp/subr.el (delete-dups): Use a hash tableOleh Krehel2015-05-061-5/+13
| | | | | | * lisp/subr.el (delete-dups): When there are more than 100 candidates, use a hash table. This can result in ~500 times speed-up for typical collections of size 5000, like that of `load-library'.
* * lisp/subr.el (delay-mode-hooks): Fix doc typo.Glenn Morris2015-04-271-1/+1
|
* Fix change from 2015-04-22 "On C-y, stop some text property entries ..."Alan Mackenzie2015-04-251-14/+14
| | | | | * lisp/subr.el (remove-yank-excluded-properties): put `with-silent-modifications' around only the last three lines of code.
* Clarify the doc string of 'replace-regexp-in-string'Eli Zaretskii2015-04-251-1/+2
| | | | * lisp/subr.el (replace-regexp-in-string): Doc fix. (Bug#20395)
* On C-y, stop some text property entries being written into buffer-undo-listAlan Mackenzie2015-04-221-14/+15
| | | | | lisp/subr.el (remove-yank-excluded-properties): enclose the code in `with-silent-modifications'.
* (looking-back): Make the second arg non-optional.Stefan Monnier2015-04-151-7/+8
| | | | | | * lisp/subr.el (substitute-key-definition-key, special-form-p) (macrop): Drop deprecated second arg to indirect-function. (looking-back): Make the second arg non-optional.
* Remove left over code from when we used an obsolete/loaddefs.el fileStefan Monnier2015-04-131-3/+1
| | | | | * lisp/subr.el (do-after-load-evaluation): Remove left over code from when we used an obsolete/loaddefs.el file.
* Add facility to collect stderr of async subprocessDaiki Ueno2015-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.h (register_aux_fd): New function declaration. * src/w32.c (register_aux_fd): New function. * src/process.h (struct Lisp_Process): New member stderrproc. * src/process.c (PIPECONN_P): New macro. (PIPECONN1_P): New macro. (Fdelete_process, Fprocess_status, Fset_process_buffer) (Fset_process_filter, Fset_process_sentinel, Fstop_process) (Fcontinue_process): Handle pipe process specially. (create_process): Respect p->stderrproc. (Fmake_pipe_process): New function. (Fmake_process): Add new keyword argument :stderr. (wait_reading_process_output): Specially handle a pipe process when it gets an EOF. (syms_of_process): Register Qpipe and Smake_pipe_process. * doc/lispref/processes.texi (Asynchronous Processes): Document `make-pipe-process' and `:stderr' keyword of `make-process'. * lisp/subr.el (start-process): Suggest to use `make-process' handle standard error separately. * test/automated/process-tests.el (process-test-stderr-buffer) (process-test-stderr-filter): New tests. * etc/NEWS: Mention new process type `pipe' and its usage with the `:stderr' keyword of `make-process'.
* Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r.Alan Mackenzie2015-04-051-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also expunge eudc-c[ad]+r. * subr.el (internal--compiler-macro-cXXr): "New" function, copied from cl--compiler-macro-cXXr. (caar, cadr, cdar, cddr): Change from defsubsts to defuns with the above compiler-macro. * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove caaar, etc., from list of new alias functions. * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro which generate obsolete cl- aliases for caaar, etc. Invoke them. * desktop.el: * edmacro.el: * emacs-lisp/cl-macs.el: * frameset.el: * ibuffer.el: * mail/footnote.el: * net/dbus.el: * net/eudc-export.el: * net/eudc.el: * net/eudcb-ph.el: * net/rcirc.el: * net/secrets.el: * play/5x5.el: * play/decipher.el: * play/hanoi.el: * progmodes/hideif.el: * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc.
* Generalize start-process with keyword argsDaiki Ueno2015-03-231-0/+24
| | | | | | | | | | | | | | | | * src/process.c (Fmake_process): New function. (create_process, create_pty): Check p->pty_flag instead of Vprocess_connection_type. (syms_of_process): Register QCcommand, QCconnection_type, Qpty, Qpipe, and Smake_process. Unregister Sstart_process. * lisp/subr.el (start-process): New function, ported from the C implementation. * doc/lispref/processes.texi (Asynchronous Processes): Mention `make-process'. * etc/NEWS: Mention `make-process'.
* subr.el (apply-partially): Use lexical binding.David Kastrup2015-02-081-2/+2
| | | | | | | | Fixes: debbugs:19785 See <URL:http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00784.html> for discussion.
* * src/data.c (Findirect_function): Don't signal an errorStefan Monnier2015-02-081-0/+1
| | | | | | * src/data.c (Findirect_function): Like `symbol-function', don't signal an error for void functions any more. * lisp/subr.el (indirect-function): Change advertised calling convention.
* Fix json error-definition condition build errorLars Magne Ingebrigtsen2015-02-061-1/+1
| | | | | * lisp/subr.el (define-error): The error conditions may be constant lists, so use `append' to concatenate them.
* Merge from origin/emacs-24Fabián Ezequiel Gallina2015-01-281-12/+21
|\ | | | | | | | | | | 8ee825c doc/emacs/programs.texi (Custom C Indent): Fix a typo. (Bug#19647) 88ba49f Fix coding.c subscript error 3ea1b31 Prevent artist-mode from creating runaway timers (Bug#6130).
| * Prevent artist-mode from creating runaway timers (Bug#6130).Daniel Koning2015-01-211-12/+21
| | | | | | | | | | | | | | | | | | | | | | * subr.el (posnp): Correct docstring of `posnp'. (posn-col-row): Make it work with all mouse position objects. * textmodes/artist.el (artist-mouse-draw-continously): Cancel timers if an error occurs during continuous drawing. (Bug#6130) * commands.texi (Drag Events, Motion Events, Event Examples) (Accessing Mouse): Describe actual range of values that mouse position objects can have.
| * Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
| * * lisp/subr.el (redisplay-dont-pause): Mark as obsolete.Stefan Monnier2014-12-181-0/+1
| | | | | | | | | | | | * doc/lispref/display.texi (Forcing Redisplay): Remove references to redisplay-dont-pause and redisplay-preemption-period (which doesn't even exist).
* | * lisp/subr.el (redisplay-dont-pause): Mark as obsolete.Stefan Monnier2015-01-081-0/+1
| | | | | | | | | | | | * doc/lispref/display.texi (Forcing Redisplay): Remove references to redisplay-dont-pause and redisplay-preemption-period (which doesn't even exist).
* | Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2014-12-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2616307 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it. c773edc * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in wrong debug buffer. (tramp-gw-open-connection): Set process coding system 'binary. (tramp-gw-open-network-stream): Handle HTTP error 403. 8032fc1 * .gitignore: Ignore /conftest*. fb420e7 * lisp/subr.el (sit-for): Tweak docstring. 061db13 Fix vc-git-dir-status-files WRT up-to-date vs edited bb57c94 Consider electric-pair-mode in tex-mode. 7b94572 * test/automated/flymake/warnpred/test.pl: Tweak earlier change. 59c218f ChangeLog fix db2a768 * test/automated/flymake/warnpred/test.pl: Tweak format d9005dd src/gnutls.c (gnutls_init): Fix deprecation warning from GCC. Conflicts: ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
| * * lisp/subr.el (sit-for): Tweak docstring.Stefan Monnier2014-12-151-2/+2
| | | | | | | | | | | | | | | | Fixes: debbugs:19381 * src/buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring. * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit to 78.
| * * lisp/subr.el (call-process-shell-command, process-file-shell-command):Stefan Monnier2014-10-201-8/+13
| | | | | | | | | | | | | | | | Make the `args' obsolete. (start-process-shell-command, start-file-process-shell-command): Use `declare'. Fixes: debbugs:18409
* | * lisp/subr.el (filter): Remove. Use `cl-remove-if-not' or `seq-filter'.Stefan Monnier2014-12-041-5/+0
| |
* | Add filter macro, which does what you expect.Eric S. Raymond2014-12-021-0/+5
| | | | | | | | | | * subr.el (filter): New macro. Because it's just silly for a Lisp not to have this in 2014. And VC mode needs it.
* | * lisp/subr.el (pop): Don't call the getter twice.Stefan Monnier2014-11-051-1/+2
| | | | | | | | Fixes: debbugs:18968
* | Simplify use of current-time and friends.Paul Eggert2014-10-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/org.texi (Dynamic blocks): * lisp/allout-widgets.el (allout-widgets-hook-error-handler): * lisp/calendar/appt.el (appt-display-message): * lisp/calendar/icalendar.el (icalendar--convert-float-to-ical): * lisp/calendar/timeclock.el (timeclock-in, timeclock-when-to-leave) (timeclock-last-period, timeclock-day-base): * lisp/eshell/em-ls.el (eshell-ls-file): * lisp/eshell/esh-util.el (eshell-parse-ange-ls): * lisp/generic-x.el (named-database-print-serial): * lisp/net/newst-backend.el (newsticker--get-news-by-url-callback) (newsticker-get-news, newsticker--sentinel-work) (newsticker--image-get, newsticker--image-sentinel): * lisp/net/tramp-sh.el (tramp-get-remote-touch): * lisp/progmodes/opascal.el (opascal-debug-log): * lisp/textmodes/remember.el (remember-mail-date) (remember-store-in-files): * lisp/vc/vc-annotate.el (vc-annotate-display-autoscale) (vc-default-annotate-current-time): * lisp/vc/vc-bzr.el (vc-bzr-shelve-snapshot): * lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time): * lisp/vc/vc-rcs.el (vc-rcs-annotate-current-time): * lisp/url/url-util.el (url-get-normalized-date): * lisp/erc/erc-backend.el (TOPIC): * lisp/gnus/gnus-delay.el (gnus-delay-article): * lisp/gnus/gnus-sum.el (gnus-summary-read-document): * lisp/gnus/gnus-util.el (gnus-seconds-today, gnus-seconds-month): * lisp/gnus/message.el (message-make-expires-date): * lisp/org/org-archive.el (org-archive-subtree) (org-archive-to-archive-sibling): * lisp/org/org-clock.el (org-resolve-clocks, org-clock-get-sum-start) (org-clock-special-range): * lisp/org/org-timer.el (org-timer-seconds): * lisp/org/org.el (org-read-date-analyze, org-get-cursor-date): * lisp/org/ox-html.el (org-html-format-spec): * lisp/org/ox-icalendar.el (org-icalendar--vtodo): Omit unnecessary call to current-time. * lisp/calendar/time-date.el (time-to-seconds) [!float-time]: * lisp/calendar/timeclock.el (timeclock-time-to-date): * lisp/vc/vc-annotate.el (vc-annotate-convert-time): Use current time if arg is nil, to be compatible with float-time. (time-date--day-in-year): New function, with most of the guts of the old time-to-day-in-year. (time-to-day-in-year): Use it. (time-to-days): Use it, to avoid decoding the same time stamp twice. * lisp/calendar/timeclock.el (timeclock-update-mode-line): * lisp/cedet/srecode/args.el (srecode-semantic-handle-:time): * lisp/gnus/gnus-util.el (gnus-seconds-year): * lisp/org/org.el (org-get-cursor-date): Don't call current-time twice to get the current time stamp, as this can lead to inconsistent results. * lisp/completion.el (cmpl-hours-since-origin): * lisp/erc/erc.el (erc-emacs-time-to-erc-time): * lisp/ido.el (ido-time-stamp): * lisp/vc/vc-annotate.el (vc-annotate-convert-time): Simplify by using float-time. * lisp/completion.el (save-completions-to-file): * lisp/url/url-cache.el (url-cache-prune-cache): Rename local var to avoid confusion. * lisp/gnus/gnus-util.el (gnus-float-time): * lisp/net/rcirc.el (rcirc-float-time): * lisp/org/org-compat.el (org-float-time): Simplify to an alias because time-to-seconds now behaves like float-time with respect to nil arg. * lisp/subr.el (progress-reporter-do-update): Don't call float-time unless needed. * lisp/erc/erc.el (erc-current-time): Simplify by using erc-emacs-time-to-erc-time. * lisp/org/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy conversion from floating point to Emacs time and back. (org-resolve-clocks): Prefer two-argument floor.
* | * lisp/mouse.el (mouse-drag-line): Use set-transient-map.Stefan Monnier2014-10-211-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (mouse--down-1-maybe-follows-link): Remove unused var `this-event'. (mouse-yank-secondary): Use gui-get-selection. (mouse--down-1-maybe-follows-link): Use read-key. * lisp/subr.el (read-key): Fix clicks on the mode-line. (set-transient-map): Return exit function. * lisp/xt-mouse.el: Add `event-kind' property on the fly from xterm-mouse-translate-1 rather than statically at the outset. Fixes: debbugs:18015
* | * lisp/Makefile.in (obsolete-autoloads): Write to a separate file,Glenn Morris2014-10-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | to workaround autoloads bug. (AUTOGENEL): Add obsolete/loaddefs.el. * lisp/loadup.el: Load obsolete/loaddefs.el if present. * lisp/subr.el (do-after-load-evaluation): Don't warn about obsolete/loaddefs.el. Fixes: debbugs:17407
* | Consolidate x-select-text.Stefan Monnier2014-10-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (gui-method, gui-method-define, gui-method-declare) (gui-call): New macros. (gui-method--name): New function. (frame-creation-function-alist): Use gui-method-declare. (make-frame): Use gui-method. * lisp/select.el (gui-select-enable-clipboard): Rename from x-select-enable-clipboard and move here. (x-select-enable-clipboard): Define as obsolete alias. (gui-last-selected-text): New var, to replace x-last-selected-text. (gui-select-text): New GUI method. (gui-select-text): New function. (x-select-text): Define as obsolete alias. * lisp/term/common-win.el (x-select-enable-clipboard, x-select-text): Move to select.el. * lisp/simple.el (interprogram-cut-function): Change default to x-select-text. (interprogram-paste-function): Change default to `ignore'. * lisp/w32-common-fns.el (interprogram-cut-function): Don't modify. * lisp/term/x-win.el (interprogram-cut-function): Don't modify. (gui-select-text): Add method for x. * lisp/term/w32-win.el (gui-select-text): Add method for w32. * lisp/term/pc-win.el (x-last-selected-text): Remove, use gui-last-selected-text instead. (msdos-initialize-window-system): Don't set interprogram-cut-function. (gui-select-text): Add method for pc. * lisp/term/ns-win.el (ns-last-selected-text): Remove, use gui-last-selected-text instead. (gui-select-text): Add method for ns. (x-setup-function-keys): Don't change interprogram-cut-function. * lisp/loadup.el ("startup"): Load after "frame". * lisp/subr.el (package--builtin-versions, package--description-file): Move from startup.el. * lisp/startup.el (package--builtin-versions, package--description-file): Move to subr.el. (handle-args-function-alist, window-system-initialization-alist): Use gui-method-declare. (command-line): Use gui-method. * src/xselect.c (selection-converter-alist): Fix docstring.
* | * lisp/subr.el (alist-get): New accessor.Stefan Monnier2014-10-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/gv.el (alist-get): Provide expander. * lisp/winner.el (winner-remember): * lisp/tempo.el (tempo-use-tag-list): * lisp/progmodes/gud.el (minor-mode-map-alist): * lisp/international/mule-cmds.el (define-char-code-property): * lisp/frameset.el (frameset-filter-params): * lisp/files.el (dir-locals-set-class-variables): * lisp/register.el (get-register, set-register): * lisp/calc/calc-yank.el (calc-set-register): Use it. * lisp/ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete. * lisp/tooltip.el (tooltip-set-param): Mark as obsolete. (tooltip-show): Use alist-get instead. * lisp/ses.el (ses--alist-get): Remove. Use alist-get instead. * admin/unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get and cl-incf.
* | * lisp/subr.el (track-mouse): New macro.Stefan Monnier2014-09-271-0/+8
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Remove track-mouse case. * lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove. * src/keyboard.c (track-mouse): Rename to internal--track-mouse. Make it into a function and change arg to be a function.
* | Merge from emacs-24; up to 2014-07-08T06:24:07Z!eggert@cs.ucla.eduGlenn Morris2014-09-071-4/+9
|\ \ | |/
| * Fix misleading doc string revealed in bug #18385.Eli Zaretskii2014-09-041-4/+9
| | | | | | | | lisp/subr.el (posn-actual-col-row): Doc fix.
* | * lisp/subr.el (call-process-shell-command, process-file-shell-command):Stefan Monnier2014-09-041-8/+13
| | | | | | | | | | | | | | | | Make the `args' obsolete. (start-process-shell-command, start-file-process-shell-command): Use `declare'. Fixes: debbugs:18409
* | Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ruGlenn Morris2014-09-021-4/+1
|\ \ | |/
| * Fix bug #18384 with incorrect reporting of row number by posn-col-row.Eli Zaretskii2014-09-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | lisp/subr.el (posn-col-row): Revert the change from commit 2010-11-13T21:07:58Z!eliz@gnu.org, which was inadvertently merged from emacs-23 release branch in 2010-11-18T03:54:14Z!monnier@iro.umontreal.ca, and introduced an off-by-one error in the reported row when there is a header line. src/dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in the reported row in the case of a window with a header line, by improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.