Commit graph

980 commits

Author SHA1 Message Date
Juanma Barranquero
2724d9c71e lisp/subr.el: Rework previous change.
* lisp/subr.el (display-delayed-warnings): Doc fix.
  (collapse-delayed-warnings): New function to collapse identical
  adjacent warnings.
  (delayed-warnings-hook): Add it.
2012-01-23 03:10:36 +01:00
Juanma Barranquero
d1a5c3b450 lisp/subr.el (display-delayed-warnings): Collapse identical adjacent messages. 2012-01-23 02:10:50 +01:00
Lars Magne Ingebrigtsen
4e5d086de6 (with-selected-frame): Mention that the selected frame is restored.
Fixes: debbugs:9980
2012-01-07 06:57:57 +01:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
ee7683ebb7 Spelling fixes. 2011-11-22 23:03:56 -08:00
Eli Zaretskii
78c79eb51b Add a coding cookie to subr.el. 2011-11-19 15:17:13 +02:00
Glenn Morris
68cbc58be5 eval-after-load fix for bug#10009
* lisp/subr.el (eval-after-load): If FILE is already loaded,
evaluate FORM before it gets wrapped in more stuff.
2011-11-10 20:46:03 -05:00
Andreas Schwab
08e1d82c88 * lisp/subr.el (keymap--menu-item-with-binding): Ignore item if not a
menu-item.
2011-10-31 11:53:16 +01:00
Chong Yidong
aa4de34102 * lisp/subr.el (y-or-n-p): Add code for batch mode.
Fixes: debbugs:9818
2011-10-29 16:41:39 +08:00
Chong Yidong
15de15c66d Replace fundamental-mode-hook with change-major-mode-after-body-hook.
* lisp/simple.el (fundamental-mode):
* lisp/emacs-lisp/derived.el (define-derived-mode): Revert 2010-04-28
change introducing fundamental-mode-hook.

* lisp/subr.el (change-major-mode-after-body-hook): New hook.
(run-mode-hooks): Run it.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Use
change-major-mode-before-body-hook.
2011-10-27 11:01:40 +08:00
Chong Yidong
b1f6fa2666 Document with-wrapper-hook.
* doc/emacs/modes.texi (Running Hooks): Document with-wrapper-hook.

* lisp/subr.el (with-wrapper-hook): Rewrite doc.
2011-10-26 08:44:06 +08:00
Stefan Monnier
08c7586636 * subr.el (apply-partially): Remove redundant comment. 2011-10-23 22:03:24 -04:00
Lars Magne Ingebrigtsen
0181e1939e (define-key-after): Clarify that the function is not useful for non-menu keymaps. 2011-10-06 21:15:19 +02:00
Leo Liu
647ab96713 Fix argument to buffer-live-p in read-char-choice 2011-10-05 11:37:21 +08:00
Juanma Barranquero
a239d4e9c0 Fix typos. 2011-09-28 02:59:28 +02:00
Stefan Monnier
01c157cc39 * lisp/subr.el (with-wrapper-hook): Fix edebug spec. 2011-09-23 10:32:36 -04:00
Lars Magne Ingebrigtsen
da9fcb933d (process-kill-buffer-query-function): Mention the buffer name in the query. 2011-09-11 05:35:02 +02:00
Lars Magne Ingebrigtsen
0b1c89c19a * subr.el (eval-after-load): Doc string clarification
Fixes: debbugs:9125
2011-09-11 04:56:39 +02:00
Lars Magne Ingebrigtsen
91054f8f7c Doc string clarification.
* subr.el (match-string): Mention that the current buffer should
be the same as the search was done in.

Fixes: debbugs:9282
2011-09-11 04:10:15 +02:00
Juri Linkov
045820ecd3 * lisp/subr.el (y-or-n-p): Capitalize "yes". 2011-09-05 11:05:01 +03:00
Stefan Monnier
b1a4f8e1d8 * lisp/subr.el (event-modifiers): Fix "missing modifier" part of docstring.
Fixes: debbugs:9356
2011-08-30 10:50:02 -04:00
Chong Yidong
f635daa1e0 Add L and R categories to standard category table, and use them.
* lisp/international/characters.el: Add L and R categories.

* lisp/subr.el (bidi-string-mark-left-to-right): Rename from
string-mark-left-to-right.  Use category search.

* lisp/buff-menu.el (Buffer-menu-buffer+size): Callers changed.
2011-08-18 11:53:29 -04:00
Chong Yidong
9ccaaa4be7 Fix behavior of string-mark-left-to-right.
* lisp/subr.el (string-mark-left-to-right): Search the entire string
for RTL script, not just the terminating character.  Doc fix.
2011-08-12 11:43:30 -04:00
Chong Yidong
3e26a4a28c New function `string-mark-left-to-right' for handling LRMs.
* lisp/subr.el (string-mark-left-to-right): New function.

* lisp/buff-menu.el (Buffer-menu-buffer+size): Remove LRM argument.
Use string-mark-left-to-right.
(list-buffers-noselect): Caller changed.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use
string-mark-left-to-right.
(tabulated-list-print): Recenter after moving point.
2011-08-10 15:03:56 -04:00
Stefan Monnier
640c8776f6 * src/keymap.c (Fmake_composed_keymap): Move to subr.el.
* lisp/subr.el (make-composed-keymap): Move from C.  Change calling
convention, and improve docstring to bring attention to a subtle point.
* lisp/minibuffer.el (completing-read-default): Adjust accordingly.
2011-08-03 17:40:06 -04:00
Glenn Morris
03ea5b873a * lisp/subr.el (read-char-choice): Respect help-form. (Bug#9001) 2011-07-15 19:59:25 -04:00
Glenn Morris
6ccf7859d6 * lisp/subr.el (read-char-choice): Allow quitting. (Bug#9001) 2011-07-15 18:53:39 -04:00
Eli Zaretskii
7e5bfb8fec lisp/subr.el (version-*): Doc fix.
lisp/subr.el (version<, version<=, version=): Mention "-CVS" and
 "-12345" alpha version numbers.
2011-07-14 02:50:21 -04:00
Lars Magne Ingebrigtsen
a28e4607f0 Doc fix for with-silent-modifications
* subr.el (with-silent-modifications): Clarify somewhat what the
macro inhibits.

Fixes: debbugs:6525
2011-07-14 01:40:11 +02:00
Lars Magne Ingebrigtsen
465c5fc88d Clarify manual and `add-hook' doc string about buffer-local hooks 2011-07-13 23:38:56 +02:00
Lars Magne Ingebrigtsen
296ba3ee9f Remove remove-duplicates', since delete-dups' is sufficient. 2011-07-12 09:26:48 +02:00
Lars Magne Ingebrigtsen
dcc88d8a92 Add a new, simple definition of `remove-duplicates' 2011-07-11 15:33:05 +02:00
Glenn Morris
7f9b7c53af * lisp/subr.el (remq): Handle the empty list. (Bug#9024) 2011-07-08 20:50:01 -04:00
Stefan Monnier
3349e122e2 Add multiple inheritance to keymaps.
* src/keymap.c (Fmake_composed_keymap): New function.
(Fset_keymap_parent): Simplify.
(fix_submap_inheritance): Remove.
(access_keymap_1): New function extracted from access_keymap to handle
embedded parents and handle lists of maps.
(access_keymap): Use it.
(Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
(Fcopy_keymap): Handle embedded parents.
(Fcommand_remapping, define_as_prefix): Simplify.
(Fkey_binding): Simplify.
(syms_of_keymap): Move minibuffer-local-completion-map,
minibuffer-local-filename-completion-map,
minibuffer-local-must-match-map, and
minibuffer-local-filename-must-match-map to Elisp.
(syms_of_keymap): Defsubr make-composed-keymap.
* src/keyboard.c (menu_bar_items): Use map_keymap_canonical.
(parse_menu_item): Trivial simplification.
* lisp/subr.el (remq): Don't allocate if it's not needed.
(keymap--menu-item-binding, keymap--menu-item-with-binding)
(keymap--merge-bindings): New functions.
(keymap-canonicalize): Use them to refine the canonicalization.
* lisp/minibuffer.el (minibuffer-local-completion-map)
(minibuffer-local-must-match-map): Move initialization from C.
(minibuffer-local-filename-completion-map): Move initialization from C;
don't inherit from anything here.
(minibuffer-local-filename-must-match-map): Make obsolete.
(completing-read-default): Use make-composed-keymap to combine
minibuffer-local-filename-completion-map with either
minibuffer-local-must-match-map or
minibuffer-local-filename-completion-map.
2011-07-02 00:27:41 -04:00
Leo Liu
7f3f739fa4 New primitive secure-hash supporting md5, sha-1 and sha-2 2011-06-21 16:55:22 +08:00
Lars Magne Ingebrigtsen
b96e6cde3e Renamed process-alive-p' to process-live-p' for consistency with other `-live-p' functions. 2011-06-15 19:30:41 +02:00
Stefan Monnier
ea9fafe093 * lisp/subr.el (make-progress-reporter): Add "..." by default.
Fixes: debbugs:8785
2011-06-02 15:04:44 -03:00
Stefan Monnier
2462470b9e Miscellaneous tweaks.
* lisp/emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for
lexical scoping as in subr.el's dolist and dotimes.
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Silence compiler warning.
* lisp/thingatpt.el (forward-whitespace): Trivial coding style fix.
* lisp/subr.el (with-output-to-temp-buffer): Provide an edebug spec.
* lisp/international/ccl.el (ccl-compile): Trivial simplification.
* lisp/help-fns.el (help-do-arg-highlight): Silence compiler warning.
* lisp/emacs-lisp/testcover.el (testcover-end): Remove spurious
`printflag' argument.
* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy the whole obsolescence data.
2011-06-01 11:19:45 -03:00
Lars Magne Ingebrigtsen
bcd54f8370 Add the tiny convenience function `process-alive-p'. 2011-05-31 20:40:00 +02:00
Kevin Ryde
2b1e1a2263 * lisp/subr.el (def-edebug-spec): Doc fix (Bug#8430). 2011-05-28 15:36:02 -04:00
Juanma Barranquero
638f053a0e Add delayed warnings support.
* etc/NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'.

* lisp/subr.el (display-delayed-warnings): New function.
  (delayed-warnings-hook): New variable.

* src/keyboard.c (Qdelayed_warnings_hook): Define.
  (command_loop_1): Run `delayed-warnings-hook' if Vdelayed_warnings_list
  is non-nil.
  (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
  (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
2011-04-28 21:35:20 +02:00
Daniel Colascione
2a782793a8 * subr.el (shell-quote-argument): Use alternate escaping strategy
when we spot a variable reference in a string.
2011-04-27 00:56:55 -07:00
Daniel Colascione
8f91bf9345 Improve Windows quoting robustness 2011-04-26 03:44:03 -07:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Chong Yidong
da91b5f294 Merge open-protocol-stream into open-network-stream.
* lisp/subr.el (open-network-stream): Move to net/network-stream.el.

* lisp/gnus/proto-stream.el: Move to net/network-stream.el.

* lisp/net/network-stream.el: Move from gnus/proto-stream.el.
Change prefix to network-stream throughout.
(open-protocol-stream): Merge into open-network-stream, leaving
open-protocol-stream as an alias.  Handle nil BUFFER args.

* lisp/gnus/nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
parameter to open-protocol-stream.

* lisp/emacs-lisp/package.el (package--with-work-buffer): Recognize
https URLs.

* lisp/url/url-gw.el (url-open-stream): Use new open-network-stream
functionality to perform encryption.
2011-04-02 19:41:03 -04:00
Stefan Monnier
40d83b412f Merge from trunk 2011-03-31 00:24:03 -04:00
Stefan Monnier
f488fb6528 * lisp/subr.el (apply-partially): Use a non-nil static environment.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamically bound.
(dolist): Use a more efficient form for lexical-binding.
(dotimes): Use a cleaner semantics for lexical-binding.
* lisp/emacs-lisp/edebug.el (edebug-eval-top-level-form):
Use eval-sexp-add-defvars.
2011-03-30 14:40:00 -04:00
Stefan Monnier
9dba2c6449 * lisp/subr.el (with-output-to-temp-buffer): Don't change current-buffer to
standard-output while running the body.
* lisp/Makefile.in (COMPILE_FIRST): Remove pcase; it's not so important.
* lisp/startup.el: Fix up warnings, move lambda expressions
outside of quote.
2011-03-29 23:27:56 -04:00
Stefan Monnier
cafdcef32d Merge from trunk 2011-03-21 12:42:16 -04:00
Stefan Monnier
78f64af0ae * subr.el (deferred-action-list, deferred-action-function): Mark obsolete. 2011-03-21 12:34:16 -04:00