Commit graph

1211 commits

Author SHA1 Message Date
Stefan Monnier
3fa173b4d9 * lisp/subr.el (eval-after-load): Fix timing for features.
(declare-function, undefined, insert-for-yank)
(replace-regexp-in-string): Follow checkdoc's recommendations.
* doc/lispref/loading.texi (Hooks for Loading): Adjust doc of eval-after-load.

Fixes: debbugs:7769
2011-01-10 22:23:04 -05:00
Chong Yidong
973f1f2a81 * lisp/subr.el (read-char-choice): Use read-key. Suggested by Stefan.
* src/fns.c (Fyes_or_no_p): Minor doc fix.
2011-01-09 09:26:29 -05:00
Chong Yidong
3d91e30286 Doc fix for y-or-n-p and yes-or-no-p.
* subr.el (y-or-n-p): Doc fix.
* fns.c (Fyes_or_no_p): Doc fix.
2011-01-08 16:17:58 -05:00
Chong Yidong
3ef01959de New function read-char-choice for reading a restricted set of chars.
* lisp/subr.el (read-char-choice): New function, factored out from
dired-query and hack-local-variables-confirm.

* lisp/dired-aux.el (dired-query):
* lisp/files.el (hack-local-variables-confirm): Use it.
2011-01-08 14:17:23 -05:00
Chong Yidong
8c51d2a2c2 Allow format args for y-or-n-p and yes-or-no-p.
* lisp/subr.el (y-or-n-p): Accept format string args.
* src/fns.c (Fyes_or_no_p): Accept format string args.
2011-01-07 12:34:02 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Glenn Morris
68251e1661 Remove code and comments related to lib-src/fns-*.el; long removed.
* Makefile.in (install-arch-dep, uninstall): Remove code relating to the
long absent lib-src/fns-*.el.

* lisp/loadup.el (symbol-file-load-history-loaded): Remove; unused.
Remove related, old, commented-out code.

* lisp/subr.el (symbol-file-load-history-loaded)
  (load-symbol-file-load-history): Remove old, commented-out code.
2010-12-15 00:16:53 -08:00
Stefan Monnier
f49d1f52b2 Merge from emacs-23 2010-12-13 10:27:36 -05:00
Stefan Monnier
f07a954eeb Make the effect of (defvar foo) local.
* src/eval.c (apply_lambda): Make static.  Remove eval_flag arg.
(Fsetq): Don't check declared_special.
(Fdefun, Fdefmacro): Use Ffunction.
(Fdefvar): Don't set declared_special for (defvar foo).
(FletX): Check locally-special vars.  Only do specbind once.
(Flet): Check locally-special vars.
(Feval): Don't check declared_special.
(funcall_lambda): Check locally-special vars.
* src/lisp.h (apply_lambda): Remove extern declaration.
* src/lread.c (readevalloop): CSE.
* lisp/subr.el (with-lexical-binding): Remove.
2010-12-12 23:04:15 -05:00
Eli Zaretskii
11aad4e9f9 subr.el (posn-col-row): Evaluate header-line-format in the context of
the POSITION window's buffer.
2010-12-12 22:45:57 +02:00
Glenn Morris
5612fd086e Doc fixes.
* lisp/subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
(with-silent-modifications): Doc fixes.
2010-12-10 18:34:55 -08:00
Stefan Monnier
2c302df3a1 Merge from trunk 2010-12-10 19:13:08 -05:00
Chong Yidong
74194465d7 Doc fix for posn-* functions (Bug#7471).
* lisp/subr.el (posn-x-y, posn-object-x-y, posn-object-width-height):
Doc fix (Bug#7471).
2010-12-04 19:43:18 -05:00
Stefan Monnier
7f0ea0ffc9 * lisp/subr.el (with-demoted-errors): Distinguish symbols from strings. 2010-12-03 18:20:27 -05:00
Stefan Monnier
4a47c27573 Merge from emacs-23 2010-11-17 22:54:14 -05:00
Eli Zaretskii
e68afd742f subr.el (posn-col-row): Pay attention to header line. (Bug#7390) 2010-11-13 23:07:58 +02:00
Vinicius Jose Latorre
b29f5b7bf2 Adjust doc. 2010-11-01 23:50:22 -02:00
Stefan Monnier
0c747cb143 Merge from trunk 2010-10-15 17:55:33 -04:00
Glenn Morris
10e4702abc lisp/subr.el (last): Deal with dotted lists (reported in bug#7174). 2010-10-14 01:43:39 +02:00
Stephen Berman
88f427d57c lisp/subr.el (last): Use safe-length' instead of length' (bug#7206). 2010-10-14 01:15:03 +02:00
IRIE Shinsuke
3574440031 * lisp/subr.el (last): Make it faster.
Fixes: debbugs:7174
2010-10-12 20:30:36 -07:00
Glenn Morris
77f3894962 Remove directory-sep-char, obsolete since 21.1.
* lisp/subr.el (directory-sep-char): Remove obsolete variable.
* lisp/net/tramp-compat.el: Don't mess about with the byte-compiler unless
it is "necessary".

* doc/lispref/files.texi (File Name Components): Remove ignored
section about deleted variable directory-sep-char.

* etc/NEWS: Mention above change.
2010-10-03 14:23:13 -07:00
Glenn Morris
922ad43e81 * lisp/subr.el (make-local-hook): Remove function obsolete since 21.1.
* lisp/progmodes/cc-mode.el (make-local-hook): Don't do cc-bytecomp stuff.
(c-basic-common-init, c-font-lock-init): Only call make-local-hook on
XEmacs.
* lisp/progmodes/cc-styles.el (make-local-hook): Don't do cc-bytecomp stuff.
(c-make-styles-buffer-local): Only call make-local-hook on XEmacs.

* lisp/gnu/gnus-util.el (gnus-make-local-hook): Simplify.

* etc/NEWS: Mention above change.
2010-10-02 18:53:04 -07:00
Kevin Rodgers
ac6ca7baed * subr.el (booleanp): Return t instead of a list (Bug#7086). 2010-10-02 21:11:20 -04:00
Glenn Morris
3226d6cacf Remove some functions, variables and aliases obsolete since at least 21.1.
* doc/misc/misc.texi (Shell Mode): Remove reference to old function name.

* src/character.c (Fchar_bytes): Remove obsolete function.
(syms_of_character): Remove Schar_bytes.
* lisp/subr.el (char-bytes): Remove obsolete function.

* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-keymap): Remove obsolete alias.

* lisp/isearch.el (isearch-return-char): Remove obsolete function.

* lisp/mouse.el: No longer provide mldrag.
(mldrag-drag-mode-line, mldrag-drag-vertical-line):
Remove obsolete aliases.

* lisp/comint.el (comint-kill-output): Remove obsolete alias.

* lisp/shell.el: Comment fix.

* lisp/composite.el (decompose-composite-char): Remove obsolete function.
* lisp/ps-def.el (decompose-composite-char): Remove unused function.

* lisp/iswitchb.el (iswitchb-default-keybindings): Remove obsolete function.

* lisp/outline.el (outline-visible): Remove obsolete function.

* lisp/term/pc-win.el (x-frob-font-slant, x-frob-font-weight):
* lisp/faces.el (internal-find-face, internal-get-face)
(frame-update-faces, frame-update-face-colors)
(x-frob-font-weight, x-frob-font-slant)
(internal-frob-font-weight, internal-frob-font-slant)
(x-make-font-bold, x-make-font-demibold, x-make-font-unbold)
(x-make-font-italic, x-make-font-oblique, x-make-font-unitalic)
(x-make-font-bold-italic): Remove functions and aliases, obsolete
since Emacs 21.1.
* lisp/emulation/viper-util.el (viper-get-face):
* lisp/obsolete/lucid.el (find-face, get-face): Use facep.
* lisp/vc/ediff-init.el (ediff-valid-color-p, ediff-get-face):
Remove unused functions.
* lisp/vc/ediff-util.el (ediff-submit-report): Doc fix.

* etc/NEWS: Mention above changes.
2010-10-01 19:46:13 -07:00
Stefan Monnier
a01a793208 Merge from trunk 2010-09-30 01:28:20 +02:00
Juanma Barranquero
f071341124 * subr.el (y-or-n-p): Remove leftover code from 2010-09-17T13:30:30Z!monnier@iro.umontreal.ca. 2010-09-20 02:52:17 +02:00
Stefan Monnier
31c381e884 * lisp/subr.el (y-or-n-p): Add the "(y or n)" that was lost somehow. 2010-09-17 15:30:30 +02:00
Juanma Barranquero
6664fc59a8 Merge changes from emacs-23 branch. 2010-09-14 16:41:53 +02:00
Stefan Monnier
f3a30a50fa * subr.el (unintern): Declare the obarray arg mandatory.
* emacs-lisp/byte-run.el (set-advertised-calling-convention):
Add `when' argument.  Update callers.
2010-09-14 13:11:44 +02:00
Stefan Monnier
cc390e46c7 Merge from trunk 2010-09-13 16:40:48 +02:00
Stefan Monnier
5616cc54c5 * lisp/subr.el (y-or-n-p): New function, moved from src/fns.c. Use read-key.
* src/fns.c (Fy_or_n_p): Move to lisp/subr.el.
(syms_of_fns): Don't defsubr Sy_or_n_p.
* src/lisp.h: Don't declare Fy_or_n_p.
* src/fileio.c (barf_or_query_if_file_exists): Fy_or_n_p -> y-or-n-p.
2010-09-12 16:35:37 +02:00
Stefan Monnier
f291fe60fb Use `declare' in defmacros.
* lisp/window.el (save-selected-window):
* lisp/subr.el (with-temp-file, with-temp-message, with-syntax-table):
* lisp/progmodes/python.el (def-python-skeleton):
* lisp/net/dbus.el (dbus-ignore-errors):
* lisp/jka-cmpr-hook.el (with-auto-compression-mode):
* lisp/international/mule.el (with-category-table):
* lisp/emacs-lisp/timer.el (with-timeout):
* lisp/emacs-lisp/lisp-mnt.el (lm-with-file):
* lisp/emacs-lisp/eieio.el (with-slots):
* lisp/emacs-lisp/easymenu.el (easy-menu-define):
* lisp/emacs-lisp/debug.el (debugger-env-macro):
* lisp/emacs-lisp/cl-compat.el (Multiple-value-bind, Multiple-value-setq)
(Multiple-value-call, Multiple-value-prog1):
* lisp/emacs-lisp/cl-seq.el (cl-parsing-keywords, cl-check-key)
(cl-check-test-nokey, cl-check-test, cl-check-match): Move indent and
edebug rule to definition.
* lisp/emacs-lisp/lisp-mode.el (save-selected-window)
(with-current-buffer, combine-after-change-calls)
(with-output-to-string, with-temp-file, with-temp-buffer)
(with-temp-message, with-syntax-table, read-if, eval-after-load)
(dolist, dotimes, when, unless):
* lisp/emacs-lisp/byte-run.el (inline): Remove indent rule, redundant.
2010-08-30 15:03:05 +02:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Chong Yidong
e2046ecf21 Let version-to-list handle versions like "10.3d".
* lisp/subr.el (version-regexp-alist): Don't use "a" and "b" for
"alpha" and "beta".
(version-to-list): Handle versions like "10.3d".
2010-08-28 21:31:45 -04:00
Chong Yidong
b0126eac41 Merge changes from emacs-23 branch. 2010-08-22 16:02:16 -04:00
Stefan Monnier
3ff7862473 * subr.el (read-key): Don't echo keystrokes.
Fixes: debbugs:6883
2010-08-21 10:56:54 +02:00
Stefan Monnier
186e86dbac * lisp/subr.el (read-key): Don't hide the menu-bar entries.
Fixes: debbugs:6881
2010-08-19 16:37:31 +02:00
Andreas Schwab
7467d0a812 * subr.el (ignore-errors): Add debug declaration. 2010-08-11 15:43:49 +02:00
Stefan Monnier
0ee81a0ce0 Merge from trunk 2010-07-23 17:23:09 +02:00
Chong Yidong
2ec1b5ee34 Merge changes from emacs-23 branch. 2010-07-10 14:52:53 -04:00
Stefan Monnier
b8add347be * lisp/subr.el (read-quoted-char): Fix up last change.
Fixes: debbugs:6290
2010-06-16 23:37:13 -04:00
Stefan Monnier
b9598260f9 New branch for lexbind, losing all history.
This initial patch is based on 2002-06-27T22:39:10Z!storm@cua.dk of the original
lexbind branch.
2010-06-13 16:36:17 -04:00
Juanma Barranquero
087fc47ace Turn `directory-sep-char' into a noop.
* lisp/subr.el (directory-sep-char): Move from fileio.c and make a defconst.

* src/emacs.c (decode_env_path): Don't check DIRECTORY_SEP,
  call dostounix_filename directly.

* src/fileio.c (CORRECT_DIR_SEPS): Remove.
  (Ffile_name_directory, directory_file_name, Fexpand_file_name)
  (Fsubstitute_in_file_name): Use dostounix_filename instead.
  (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP.
  (syms_of_fileio) <directory-sep-char>: Move to subr.el.

* src/lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare.
  (DIRECTORY_SEP): Define unconditionally.

* src/w32proc.c (CORRECT_DIR_SEPS): Remove.
  (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename.

* src/s/ms-w32.h (DIRECTORY_SEP): Remove.
2010-06-04 16:13:35 +02:00
Juanma Barranquero
fe40dc63a6 Fix for momentary-string-display (Bug#6238).
* lisp/subr.el (momentary-string-display): Just use read-event to read
the exit event (Bug#6238).
2010-05-31 10:13:41 -04:00
Juanma Barranquero
450439d5b6 Fix for momentary-string-display (Bug#6238).
* lisp/subr.el (momentary-string-display): Just use read-event to read
the exit event (Bug#6238).
2010-05-31 10:11:18 -04:00
Eli Zaretskii
db5dce9dd1 Implement bidi-sensitive word movement with arrow keys.
lisp/subr.el (right-arrow-command, left-arrow-command): Move to bindings.el.
 lisp/bindings.el (right-char, left-char): Move from subr.el and
 rename from right-arrow-command and left-arrow-command.
 (right-word, left-word): New functions.
 (global-map) <right>: Bind to right-char.
 (global-map) <left>: Bind to left-char.
 (global-map) <C-right>: Bind to right-word.
 (global-map) <C-left>: Bind to left-word.

 doc/emacs/basic.texi (Moving Point): Update due to renaming of commands bound
 to arrows.  Document bidi-aware behavior of C-<right> and C-<left>.
2010-05-29 18:19:13 +03:00
Chong Yidong
29031d52fe Stefan Monnier <monnier@iro.umontreal.ca> 2010-05-18 16:51:12 -04:00
Stefan Monnier
278847cd92 * subr.el (read-quoted-char): Resolve modifiers after key remapping.
Fixes: debbugs:6212
2010-05-18 16:31:44 -04:00
Eli Zaretskii
d20e1419fd Implement bidi-sensitive movement with arrow keys.
src/bidi.c (bidi_paragraph_init): Don't leave alone garbage values
 of bidi_it->paragraph_dir.  Call bidi_initialize if needed.
 src/xdisp.c (Fcurrent_bidi_paragraph_direction): New function.
 (syms_of_xdisp): Defsubr it.
 src/cmds.c (Fforward_char, Fbackward_char): Doc fix.
 src/subr.el (right-arrow-command, left-arrow-command): New functions.
 src/bindings.el (global-map): Bind them to right and left arrow keys.
 etc/NEWS: Mention current-bidi-paragraph-direction
2010-05-15 16:23:48 +03:00