Chong Yidong
19fb718672
* subr.el (last-input-char, last-command-char): Remove.
...
Fixes: debbugs:9195
2012-07-18 22:46:32 +08:00
Chong Yidong
9aeb25a6b4
* subr.el (keyboard-translate): Doc fix.
...
Fixes: debbugs:7261
2012-07-18 21:31:16 +08:00
Stefan Monnier
36cec983d4
Further GV/CL cleanups.
...
* lisp/emacs-lisp/gv.el (gv-get): Autoload functions to find their
gv-expander.
(gv--defun-declaration): New function.
(defun-declarations-alist): Use it.
(gv-define-modify-macro, gv-pushnew!, gv-inc!, gv-dec!): Remove.
(gv-place): Autoload.
* lisp/emacs-lisp/cl.el (cl--dotimes, cl--dolist): Remember subr.el's
original definition of dotimes and dolist.
* lisp/emacs-lisp/cl-macs.el (cl-expr-access-order): Remove unused.
(cl-dolist, cl-dotimes): Use `dolist' and `dotimes'.
* lisp/emacs-lisp/cl-lib.el: Move gv handlers from cl-macs to here.
(cl-fifth, cl-sixth, cl-seventh, cl-eighth)
(cl-ninth, cl-tenth): Move gv handler to the function's definition.
* lisp/emacs-lisp/cl-extra.el (cl-subseq, cl-get, cl-getf): Move gv handler
to the function's definition.
* lisp/Makefile.in (COMPILE_FIRST): Re-order to speed it up by about 50%.
* lisp/window.el:
* lisp/files.el:
* lisp/faces.el:
* lisp/env.el: Don't use CL.
2012-06-22 17:24:54 -04:00
Stefan Monnier
ac77b21adb
* lisp/subr.el (read-passwd): Don't use a history at all.
...
* lisp/savehist.el (savehist-save): Remove password saved accidentally
because of the above bug.
2012-06-22 13:30:25 -04:00
Stefan Monnier
2ee3d7f0aa
Provide generalized variables in core Elisp.
...
* lisp/emacs-lisp/gv.el: New file.
* lisp/subr.el (push, pop): Extend to generalized variables.
* lisp/loadup.el (macroexp): Unload if preloaded and uncompiled.
* lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove.
* lisp/emacs-lisp/cl-macs.el: Require gv. Use gv-define-setter,
gv-define-simple-setter, and gv-define-expander.
Remove setf-methods defined in gv. Rename cl-setf -> setf.
(cl-setf, cl-do-pop, cl-get-setf-method): Remove.
(cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf)
(cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el.
(cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with
gv-letplace.
(cl-defstruct): Don't define setf-method any more.
* lisp/emacs-lisp/cl.el (flet): Don't autoload.
(cl--letf, letf, cl--letf*, letf*, cl--gv-adapt)
(define-setf-expander, defsetf, define-modify-macro)
(cl-struct-setf-expander): Move from cl-lib.el.
* lisp/emacs-lisp/syntax.el:
* lisp/emacs-lisp/ewoc.el:
* lisp/emacs-lisp/smie.el:
* lisp/emacs-lisp/cconv.el:
* lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push.
(timer--time): Use gv-define-simple-setter.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let²
to avoid coding-system problems in subr.el. Adjust all users.
(macroexp--maxsize, macroexp-small-p): New functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf.
* lisp/scroll-bar.el (scroll-bar-mode):
* lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
(normal-erase-is-backspace-mode): Don't use the `eq' place.
* lisp/winner.el (winner-configuration, winner-make-point-alist)
(winner-set-conf, winner-get-point, winner-set): Don't abuse letf.
* lisp/files.el (locate-file-completion-table): Avoid list*.
Fixes: debbugs:11657
2012-06-22 09:42:38 -04:00
Chong Yidong
c6bf302224
Preserve tty top-frames under various window-changing operations.
...
* subr.el (with-selected-window): Preserve the selected window's
terminal's top-frame.
* window.el (save-selected-window): Likewise.
* frame.c (delete_frame): When selecting a frame on a different
text terminal, do not alter the terminal's top-frame.
* term.c (Ftty_top_frame): New function.
* xdisp.c (format_mode_line_unwind_data): Record the target
frame's selected window and its terminal's top-frame.
(unwind_format_mode_line): Restore them.
(x_consider_frame_title, display_mode_line, Fformat_mode_line):
Callers changed.
(x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
since tty frames can be explicitly named.
(prepare_menu_bars): Likewise.
Fixes: debbugs:4702
2012-06-19 14:49:50 +08:00
Stefan Monnier
ed8bd4d705
* subr.el (kbd): Make it its own function.
2012-06-07 12:20:28 -04:00
Chong Yidong
3726946669
Remove incorrect uses of "modeline".
...
* ansi-color.el (ansi-color-faces-vector): Change default faces.
* cus-edit.el (mode-line):
* dframe.el (dframe-mouse-hscroll):
* emacs-lisp/re-builder.el:
* emacs-lisp/easy-mmode.el (define-minor-mode):
* frame.el (set-frame-name):
* help.el (lookup-minor-mode-from-indicator):
* net/rcirc.el (rcirc-activity-string, rcirc-short-buffer-name):
* progmodes/cc-cmds.el (c-toggle-auto-newline)
(c-toggle-hungry-state):
* progmodes/antlr-mode.el (antlr-language-alist):
* progmodes/idlw-shell.el (idlwave-shell-electric-stop-line-face):
* progmodes/vhdl-mode.el (vhdl-mode):
* progmodes/which-func.el (which-func, which-func-cleanup-function):
* term/ns-win.el (ns-face-at-pos):
* term/sup-mouse.el (sup-mouse-report):
* textmodes/flyspell.el (flyspell-mode-line-string):
* textmodes/ispell.el (ispell-highlight-face):
* textmodes/reftex-global.el:
* vc/vc-arch.el (vc-arch-mode-line-string):
* vc/vc-cvs.el (vc-cvs-mode-line-string):
* vc/vc-git.el (vc-git-mode-line-string):
* vc/vc-hooks.el (vc-display-status)
(vc-default-mode-line-string):
* vc/vc-mtn.el (vc-mtn-mode-line-string): Doc fixes.
* dired.el (dired-sort-set-mode-line): Rename from
dired-sort-set-modeline. All callers changed.
* foldout.el (foldout-mode-line-string): Rename from
foldout-modeline-string. All callers changed.
(foldout-update-mode-line): Rename from foldout-update-modeline.
* strokes.el (strokes-lighter): Rename from
strokes-modeline-string.
* subr.el (redraw-modeline): Make into obsolete alias.
* calendar/timeclock.el (timeclock-mode-line-display): Rename from
timeclock-modeline-display. Make old name an alias.
(timeclock-update-mode-line): Likewise. All callers changed.
(timeclock-mode-line-display): No need to check before using
add-hook.
(timeclock-relative, timeclock-day-over-hook)
(timeclock-use-elapsed, timeclock-mode-string)
(timeclock-mode-line-display): Doc fix, "modeline" -> "mode line".
* emulation/crisp.el (crisp-mode-mode-line-string): Rename from
crisp-mode-modeline-string.
* erc-track.el (erc-track, erc-track-faces-priority-list)
(erc-track-faces-normal-list, erc-track-find-face)
(erc-track-modified-channels): Fix modeline -> mode line in docs.
* eshell/esh-mode.el (eshell-status-in-mode-line): Rename from
eshell-status-in-modeline.
* org-clock.el (org-clock-string-limit)
(org-clock-modeline-total, org-clock-task-overrun-text)
(org-clock-mode-line-entry): Doc fix, "modeline" -> "mode line".
* play/solitaire.el (solitaire-build-mode-line): Rename from
solitaire-build-modeline. All callers changed.
* play/zone.el (zone-hiding-mode-line): Rename from
zone-hiding-modeline. All callers changed.
(zone): Remove unusued `modeline-hidden-level' property.
* progmodes/xscheme.el (xscheme-mode-line-initialize): Rename from
xscheme-modeline-initialize. All callers changed.
* textmodes/sgml-mode.el (html-face-tag-alist)
(html-tag-face-alist): Use mode-line face instead of obsolete
alias modeline.
Fixes: debbugs:10329
2012-06-02 18:56:09 +08:00
Stefan Monnier
434163923d
* lisp/subr.el (buffer-has-markers-at): Mark obsolete.
2012-05-26 15:55:07 -04:00
Stefan Monnier
a179e3f7b4
Use declare' in
lambda' and mis minor changes.
...
* lisp/subr.el (lambda): Use declare.
* lisp/emacs-lisp/lisp-mode.el (lambda):
* lisp/emacs-lisp/edebug.el (lambda): Move properties to its definition.
* lisp/gnus/legacy-gnus-agent.el (gnus-agent-unhook-expire-days):
* lisp/gnus/gnus-demon.el (gnus-demon-init): Don't bother with type-of.
2012-05-26 11:52:27 -04:00
Stefan Monnier
8bba5a75f0
* lisp/subr.el (defvar-local): Add debug spec and doc-string position.
2012-05-08 10:11:47 -04:00
Stefan Monnier
f95e9344c9
New function set-temporary-overlay-map and macros (defvar|setq)-local.
...
* lisp/subr.el (setq-local, defvar-local): New macros.
(kbd): Redefine as an alias.
(with-selected-window): Leave unrelated frames alone.
(set-temporary-overlay-map): New function.
2012-05-04 21:47:04 -04:00
Stefan Monnier
71873e2b33
Add new error and function `user-error'.
...
* lisp/subr.el (user-error): New function.
* lisp/window.el (switch-to-buffer):
* lisp/vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
(smerge-match-conflict):
* lisp/simple.el (previous-matching-history-element)
(next-matching-history-element, goto-history-element, undo-more)
(undo-start):
* lisp/progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
(find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
(next-file, tags-loop-scan, list-tags, complete-tag):
* lisp/progmodes/compile.el (compilation-loop):
* lisp/mouse.el (mouse-minibuffer-check):
* lisp/man.el (Man-bgproc-sentinel, Man-goto-page):
* lisp/info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
(Info-history-forward, Info-follow-reference, Info-menu)
(Info-extract-menu-item, Info-extract-menu-counting)
(Info-forward-node, Info-backward-node, Info-next-menu-item)
(Info-last-menu-item, Info-next-preorder, Info-last-preorder)
(Info-next-reference, Info-prev-reference, Info-index)
(Info-index-next, Info-follow-nearest-node)
(Info-copy-current-node-name):
* lisp/imenu.el (imenu--make-index-alist)
(imenu-default-create-index-function, imenu-add-to-menubar):
* lisp/files.el (basic-save-buffer, recover-file):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* lisp/emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
(checkdoc-message-text, checkdoc-defun):
* lisp/dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
* lisp/cus-edit.el (customize-changed-options, customize-rogue)
(customize-saved, custom-variable-set, custom-variable-mark-to-save)
(custom-variable-mark-to-reset-standard)
(custom-variable-reset-backup, custom-face-mark-to-reset-standard)
(custom-file):
* lisp/completion.el (check-completion-length):
* lisp/comint.el (comint-search-arg)
(comint-previous-matching-input-string-position)
(comint-previous-matching-input)
(comint-replace-by-expanded-history-before-point, comint-send-input)
(comint-copy-old-input, comint-backward-matching-input)
(comint-goto-process-mark, comint-set-process-mark):
* lisp/calendar/calendar.el (calendar-cursor-to-date): Use it.
* lisp/bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
* src/data.c (PUT_ERROR): New macro.
(syms_of_data): Use it. Add new error type `user-error'.
* src/undo.c (user_error): New function.
(Fprimitive_undo): Use it.
* src/print.c (print_error_message): Adjust print style for `user-error'.
* src/keyboard.c (user_error): New function.
(Fexit_recursive_edit, Fabort_recursive_edit): Use it.
2012-05-04 19:16:47 -04:00
Stefan Monnier
99d2758343
* subr.el (read-passwd): Better clean after ourselves.
...
Fixes: debbugs:11392
2012-05-02 17:34:57 -04:00
Chong Yidong
a8e7d6d783
Merge changes from emacs-24 branch
2012-04-27 11:10:38 +08:00
Chong Yidong
c5bb756916
Fix for tool-bar confusion in read-key.
...
* lisp/subr.el (read-key): Avoid running filter function when setting
up temporary tool bar entries.
Fixes: debbugs:9922
2012-04-27 10:24:38 +08:00
Chong Yidong
7511ded8c9
* subr.el (accept-change-group): Fix arg usage.
...
Fixes: debbugs:6095
2012-04-23 23:48:22 +08:00
Chong Yidong
c07a4c0b59
Merge from emacs-24 branch
2012-04-20 16:48:50 +08:00
Juanma Barranquero
4d6769e1bb
lisp/*: Add declarations, remove unused bindings, mark unused args.
...
* lisp/avoid.el (mouse-avoidance-mode): Mark unused arg.
(mouse-avoidance-nudge-mouse): Remove unused binding.
* lisp/imenu.el (imenu-default-goto-function): Mark unused args.
(imenu-progress-message): Remove obsolete macro; all callers changed.
* lisp/mouse.el (mouse-menu-major-mode-map):
* lisp/emacs-lisp/authors.el (authors-scan-change-log)
(authors-add-to-author-list):
* lisp/emacs-lisp/avl-tree.el (avl-tree--enter-balance):
* lisp/emacs-lisp/smie.el (smie-auto-fill):
* lisp/mail/sendmail.el (mail-bury):
* lisp/mail/unrmail.el (unrmail):
* lisp/net/tls.el (open-tls-stream):
* lisp/textmodes/picture.el (picture-mouse-set-point):
Remove unused bindings.
* lisp/subr.el (keymap-canonicalize): Remove unused binding.
(read-passwd): Mark unused arg.
* lisp/tutorial.el (tutorial--display-changes): Remove unused binding.
(tutorial--save-tutorial-to): Remove unused variable.
* lisp/emacs-lisp/package.el (define-package, package-menu-mark-delete)
(package-menu-mark-install, package-menu-mark-unmark): Mark unused args.
(package-generate-autoloads, package-menu--generate)
(package-menu--find-upgrades): Remove unused bindings.
* lisp/emulation/cua-rect.el (cua-restrict-regexp-rectangle)
(cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings.
(cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle)
(cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle)
(cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle)
(cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as)
(cua--rectangle-aux-replace, cua--left-fill-rectangle)
(cua-scroll-rectangle-up, cua-scroll-rectangle-down)
(cua-delete-char-rectangle): Mark unused args.
(cua-align-rectangle): Remove unused binding.
* lisp/mail/rmail.el (compilation--message->loc)
(epa--find-coding-system-for-mime-charset): Declare.
* lisp/net/dbus.el (dbus-register-service): Declare.
(dbus-name-owner-changed-handler): Remove unused binding.
* lisp/nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p)
(nxml-compute-indent-from-matching-start-tag): Remove unused variables.
(nxml-scan-backward-within): Mark unused arg.
(nxml-dynamic-markup-word): Remove unused binding.
2012-04-19 19:20:26 +02:00
Glenn Morris
c0ea08d2d1
More small edits for doc/lispref/minibuf.texi
...
* doc/lispref/minibuf.texi (Object from Minibuffer):
Remove overly pedantic paragraph.
(Minibuffer History): Copyedits. Add face-name-history.
(Initial Input, Yes-or-No Queries, Multiple Queries)
(Minibuffer Windows, Minibuffer Misc): Copyedits.
(Yes-or-No Queries): Tweak example.
(Minibuffer Commands): Add next-complete-history-element.
(Minibuffer Misc): Mention minibuffer-message-timeout, and
minibuffer-inactive-mode.
* doc/lispref/minibuf.texi (Minibuffers):
* doc/lispref/elisp.texi, doc/lispref/vol1.texi, doc/lispref/vol2.texi:
Fix minibuffer subsection order.
* lisp/subr.el: Comment.
2012-04-18 23:04:05 -07:00
Juanma Barranquero
8eae3a58fc
lisp/subr.el: Update comment.
2012-04-17 18:24:44 +02:00
Stefan Monnier
088be6fbd2
* lisp/subr.el (read-passwd): Use read-string.
2012-04-11 14:13:20 -04:00
Chong Yidong
fb7ada5f94
Remove * characters from the front of variable docstrings.
2012-04-09 21:05:48 +08:00
Chong Yidong
3d439cd10f
Several miscellaneous doc changes.
...
* doc/lispref/display.texi (Delayed Warnings): New node.
* doc/misc/gnus-faq.texi (FAQ 8-2): Mention EasyPG.
* doc/misc/gnus.texi: Reduce references to obsolete pgg library.
(Security): Note that epg is now the default.
* doc/misc/message.texi (Using PGP/MIME): Note that epg is now the default.
* doc/misc/nxml-mode.texi (Completion): C-RET is no longer bound to
nxml-complete.
* lisp/subr.el (delayed-warnings-hook): Doc fix.
* src/keyboard.c (Vdelayed_warnings_list): Doc fix.
2012-04-04 15:54:02 +08:00
Glenn Morris
0835f01e98
eval-after-load fix for bug#10946
...
* lisp/subr.el (eval-after-load): If named feature is provided not
from a file, run after-load forms.
2012-03-15 21:27:23 -04:00
Chong Yidong
d3760c4b0a
Further doc fix for save-window-excursion.
2012-03-12 00:16:50 +08:00
Chong Yidong
2cc775f91d
Doc fixes for save-window-excursion.
...
* lisp/subr.el (save-window-excursion): Doc fix.
* doc/lispref/windows.texi (Window Configurations): save-window-excursion is
now a macro.
* doc/lispref/display.texi (Temporary Displays): with-output-to-temp-buffer is
now a macro.
Fixes: debbugs:9979
2012-03-12 00:10:07 +08:00
Leo Liu
1be3ca5ad7
Rename condition-case-no-debug to condition-case-unless-debug
2012-02-10 23:59:29 +08:00
Glenn Morris
001bf877d0
* etc/NEWS: Edit delayed-warnings-list entry.
...
* lisp/subr.el: Related comment.
2012-02-08 22:02:33 -08:00
Glenn Morris
c7291ad983
with-wrapper-hook doc clarifications
...
* doc/lispref/modes.texi (Running Hooks): Try to clarify with-wrapper-hook.
* lisp/subr.el (with-wrapper-hook): Doc fixes.
2012-02-04 12:59:54 -08:00
Glenn Morris
12f381b73d
Document change-major-mode-after-body-hook
...
* doc/lispref/hooks.texi (Standard Hooks):
* doc/lispref/modes.texi (Major Mode Conventions, Mode Hooks):
Document change-major-mode-after-body-hook.
* lisp/subr.el (run-mode-hooks): Doc fix.
* etc/NEWS: Markup
2012-02-01 21:57:26 -05:00
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