Commit graph

2903 commits

Author SHA1 Message Date
Chong Yidong
1099930585 Merge changes from emacs-23 branch. 2010-09-06 12:38:03 -04:00
Stefan Monnier
19fe13dfd1 * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in - or ].
(rx-any-condense-range): Explode 2-char ranges.

Fixes: debbugs:6984
2010-09-05 11:44:55 +02:00
Stefan Monnier
2e664aab0b * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
border case in change-log-mode.
2010-09-05 00:51:39 +02:00
Andreas Schwab
7ec926206c Update cl-loaddefs.el 2010-09-04 21:44:39 +02:00
Chong Yidong
0be01d2c86 * emacs-lisp/package.el (package-directory-list): Only call file-name-nondirectory on a string. 2010-09-04 13:54:48 -04:00
Chong Yidong
ebf662f494 Avoid corrupting archive-contents file.
* emacs-lisp/package.el (package--download-one-archive): Ensure
that archive-contents is valid before saving it.
(package-activate-1, package-mark-obsolete, define-package)
(package-compute-transaction, package-list-maybe-add): Use push.
2010-09-04 13:13:14 -04:00
Stefan Monnier
a49e651ea9 Provide blink-matching support to SMIE.
* lisp/emacs-lisp/smie.el (smie-bnf-closer-alist): New function.
(smie-blink-matching-triggers, smie-blink-matching-inners): New vars.
(smie-blink-matching-check, smie-blink-matching-open): New functions.
2010-09-03 13:18:45 +02:00
Chong Yidong
e687c2cdd6 Set revert-buffer-function in Package Menu.
* emacs-lisp/package.el (package-menu-mode-map): Change
package-menu-revert bindings to revert-buffer.
(package-menu-mode): Set revert-buffer-function.
(package-menu-revert): Doc fix.
2010-09-02 11:29:15 -04:00
Jan Djärv
6d7cc56382 Removed cut-buffer code.
* lisp/mouse-sel.el (mouse-sel-get-selection-function):
x-cut-buffer-or-selection-value renamed to x-selection-value.
(x-select-text): Optional push removed.

* lisp/select.el (x-get-cut-buffer, x-set-cut-buffer): Remove.

* lisp/simple.el (interprogram-cut-function): Remove mention of PUSH.

* lisp/w32-fns.el (x-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value.
(x-cut-buffer-max): Remove.
(x-select-text): Remove argument PUSH, update documentation.

* lisp/emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove.

* lisp/term/ns-win.el (x-setup-function-keys, ns-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value
(x-selection-value): Renamed from x-cut-buffer-or-selection-value.
(x-select-text): Remove argument PUSH, update documentation.

* lisp/term/pc-win.el (x-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value
(x-select-text): Remove argument PUSH, update documentation.

* lisp/term/x-win.el: Update documentation for x-last-selected-text-*.
(x-last-selected-text-cut, x-last-selected-text-cut-encoded)
(x-last-cut-buffer-coding, x-cut-buffer-max): Remove.
(x-select-text): Remove argument PUSH, update documentation.  Remove
cut-buffer code.
(x-selection-value-internal): Was previously x-selection-value.
(x-selection-value): Renamed from x-cut-buffer-or-selection-value.
Update documentation, remove cut-buffer code.  Call
x-selection-value-internal.
(x-clipboard-yank): Call x-selection-value-internal.
(x-initialize-window-system): Remove setting of x-cut-buffer-max.

* src/xselect.c: Remove declaration of cut-buffer objects and functions.
(symbol_to_x_atom): Remove mapping to XA_CUT_BUFFERn.
(x_atom_to_symbol): Remove mapping to QCUT_BUFFERn.
(Fx_get_cut_buffer_internal, Fx_store_cut_buffer_internal)
(Fx_rotate_cut_buffers_internal): Remove.
(syms_of_xselect): Remove defsubr of above.
Remove intern of QCUT_BUFFERn.

* src/xterm.c (x_term_init): Don't set dpyinfo->cut_buffers_initialized.

* src/xterm.h (struct dpyinfo): Remove cut_buffers_initialized.
2010-09-02 11:47:08 +02:00
Stefan Monnier
4de81ee0d2 * lisp/emacs-lisp/pcase.el (pcase-split-memq): Overenthusiastic optimisation.
(pcase-u1): Handle the case of a lambda pred.
2010-09-01 12:03:08 +02:00
Stefan Monnier
c8977b2e62 * lisp/emacs-lisp/smie.el (smie-down-list): New command. 2010-08-31 14:22:40 +02:00
Chong Yidong
187d3296ae Fix several Package Menu and Finder bugs.
* finder.el: Load finder-inf using `require'.
(finder-list-matches): Sorting by status is now the default.
(finder-compile-keywords): Simpify printing.

* emacs-lisp/package.el (package--read-archive-file): Just use
`read', to avoid copying an additional string.
(package-menu-mode): Set header-line-format here.
(package-menu-refresh, package-menu-revert): Signal an error if
not in the Package Menu.
(package-menu-package-list): New var.
(package--generate-package-list): Operate on the current buffer;
don't assume that it is *Packages*, since the user may rename it.
Allow persistent package listings and sort keys using
package-menu-package-list and package-menu-package-sort-key.
(package-menu--version-predicate): Fix version calculation.
(package-menu-sort-by-column): Don't select the window.
(package--list-packages): Create the *Packages* buffer.  Set
package-menu-package-list-key.
(list-packages): Sorting by status is now the default.
(package-buffer-info): Use match-string-no-properties.
(define-package): Add a &rest argument for future proofing, but
don't use it yet.
(package-install-from-buffer, package-install-buffer-internal):
Merged into a single function, package-install-from-buffer.
(package-install-file): Caller changed.

Also, fix headers for hfy-cmap.el and ps-print.el.
2010-08-30 21:53:46 -04:00
Stefan Monnier
ee992a8ced * lisp/emacs-lisp/smie.el (smie-indent-offset-rule): Let :parent take
a list of parents.
(smie-indent-column): Allow indirection through variables.
2010-08-30 17:21:14 +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
96ae4c8fa7 Merge Finder and package-menu functionality.
* lisp/finder.el: Require `package'.
(finder-known-keywords): Tweak descriptions.  Retire `oop' keyword.
(finder-package-info): Var deleted.
(finder-keywords-hash, finder--builtins-alist): New vars.
(finder-compile-keywords): Compute package--builtins and
finder-keywords-hash instead of finder-keywords-hash, respecting
the "Package" header.
(finder-unknown-keywords, finder-list-matches): Use
finder-keywords-hash and package--list-packages.
(finder-mode): Don't set font-lock-defaults.
(finder-exit): We don't use "*Finder-package*" and "*Finder
Category*" buffers anymore.

* lisp/info.el (Info-finder-find-node): Search package-alist instead of
finder-package-info.

* lisp/emacs-lisp/package.el (package--builtins-base): Var deleted.
(package--builtins): Set default value to nil.
(package-initialize): Load precomputed value of package--builtins
from finder-inf.el.
(package-alist, package-compute-transaction)
(package-download-transaction): Improve docstring.
(package-read-all-archive-contents): Do not change
package--builtins here.
(list-packages): Make package-list-packages an alias for this.
Sort by status by default.
(package--list-packages): Add optional PACKAGES arg.
(describe-package-1): Use font-lock-face property.  For built-in
packages, insert file commentary.
(package--generate-package-list): Rename from
package-list-packages-internal; all callers changed.  Add optional
PACKAGES arg.  Add alphabetical sort fallbacks.
(package-menu--version-predicate, package-menu--status-predicate)
(package-menu--description-predicate)
(package-menu--name-predicate): New functions.
2010-08-29 18:15:09 -04:00
Chong Yidong
aad4679e7d Add "Version:" and "Package:" Lisp file headers. 2010-08-29 16:10:43 -04:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Stefan Monnier
6fe79b7c7c * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Use pcase.
(macroexp-accumulate): Use `declare'.
2010-08-28 20:52:36 +02:00
Chong Yidong
cb6c4991ef Improvements to describe-package buffer.
* lisp/help.el (help-map): Bind `C-h P' to describe-package.

* lisp/menu-bar.el (menu-bar-describe-menu): Add describe-package.

* lisp/emacs-lisp/package.el (package-refresh-contents): Catch errors
when downloading archives.
(describe-package-1): Add package commentary.
(package-install-button-action): New function.
(package-menu-mode-map): Bind ? to package-menu-describe-package.
(package-menu-view-commentary): Function removed.
(package-list-packages-internal): Hide the `package' package too.
2010-08-25 23:31:34 -04:00
Chong Yidong
cb8759ca5a * emacs-lisp/package.el (list-packages): Alias for package-list-packages. 2010-08-24 17:36:33 -04:00
Chong Yidong
b0126eac41 Merge changes from emacs-23 branch. 2010-08-22 16:02:16 -04:00
Chong Yidong
bc7d7ea63b Doc fix for define-minor-mode (Bug#6880).
* doc/lispref/modes.texi (Defining Minor Modes): Doc fix (Bug#6880).

* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
2010-08-22 15:30:26 -04:00
Stefan Monnier
710a7f464c Reindent smie.el 2010-08-18 14:10:30 +02:00
Stefan Monnier
b3a8fe90e7 * smie.el (smie-forward-sexp-command): Fix typo. 2010-08-18 14:03:57 +02:00
Stefan Monnier
8723cfa464 Try and remove some of SMIE's black magic by generalizing some rules.
* lisp/emacs-lisp/smie.el (smie-default-backward-token)
(smie-default-forward-token): Strip properties.
(smie-next-sexp): Be more careful with associative operators.
(smie-forward-sexp-command): Generalize.
(smie-backward-sexp-command): Simplify.
(smie-closer-alist): New var.
(smie-close-block): New command.
(smie-indent-debug-log): New var.
(smie-indent-offset-rule): Add a few more cases.
(smie-indent-column): New function.
(smie-indent-after-keyword): Use it.
(smie-indent-keyword): Use it.
Fix up the opener code's point position.
(smie-indent-comment): Only applies at BOL.
(smie-indent-debug): New command.
2010-08-18 12:57:48 +02:00
Stefan Monnier
0193499fe1 * lisp/emacs-lisp/autoload.el (make-autoload): Preload the macros's
declarations that are useful before running the macro.
* src/eval.c (Fdefmacro): Only obey one declaration.
2010-08-18 12:21:43 +02:00
Stefan Monnier
afa22f7ce7 * lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set. 2010-08-17 22:18:40 +02:00
Kevin Ryde
c22e18f561 Save window excursion before prompting in copyright-update-* (Bug#5394).
* emacs-lisp/copyright.el (copyright-update-year)
(copyright-update): Use save-window-excursion (Bug#5394).
2010-08-14 19:30:51 -04:00
Stefan Monnier
c5683ceb2c Introduce a new comment style "c" flag.
* src/syntax.c (SYNTAX_FLAGS_COMMENT_STYLEB)
(SYNTAX_FLAGS_COMMENT_STYLEC): New macros.
(SYNTAX_FLAGS_COMMENT_STYLE): Use them, add an argument.
(syntax_prefix_flag_p): New function.
(Fstring_to_syntax): Understand new "c" flag.
(Finternal_describe_syntax_value): Recognize new flag; use the
SYNTAX_FLAGS_* macros.
(scan_sexps_forward, Fparse_partial_sexp): Change representation of
comment style to accomodate the new styles.
(back_comment, forw_comment, Fforward_comment, scan_lists)
(scan_sexps_forward): Update code to obey the new comment style flag.
* src/syntax.h: Move SYNTAX_FLAGS_FOO() macros to syntax.c.
* src/casefiddle.c (casify_region): Use the new syntax_prefix_flag_p.
* lisp/progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c"
comment style.
* lisp/progmodes/scheme.el (scheme-mode-syntax-table):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-syntax-table): Remove spurious
"b" flag in "14b" syntax.

Fixes: debbugs:6834
2010-08-12 16:44:16 +02:00
Glenn Morris
97eedd1b1f * lisp/emacs-lisp/pcase.el: Fix copyright header. 2010-08-10 19:14:53 -07:00
Stefan Monnier
d02c9bcd09 * lisp/emacs-lisp/pcase.el: New file. 2010-08-10 15:18:14 +02:00
Chong Yidong
148cef8e7a Use version-list-* functions in package.el.
* emacs-lisp/package-x.el (package-upload-buffer-internal): Use
version-to-list.
(package-upload-buffer-internal): Use version-list-<=.

* emacs-lisp/package.el (package-version-split)
(package--version-first-nonzero, package-version-compare):
Functions removed.
(package-directory-list, package-load-all-descriptors)
(package--built-in, package-activate, define-package)
(package-installed-p, package-compute-transaction)
(package-read-all-archive-contents)
(package--add-to-archive-contents, package-buffer-info)
(package-tar-file-info, package-list-packages-internal): Use
version-to-list and version-list-*.
2010-08-09 14:05:56 -04:00
Chong Yidong
7815fe1985 Merge changes from emacs-23 branch 2010-08-08 17:12:29 -04:00
Eli Zaretskii
29cf3e2076 Rename src/unexec.c => src/unexcoff.c.
src/unexcoff.c: Renamed from unexec.c.
 src/deps.mk (unexcoff.o): Rename unexec.[co] => unexcoff.[co].
 configure.in (UNEXEC_OBJ): Rename unexec.o => unexcoff.o.
 admin/MAINTAINERS: Rename src/unexec.c => src/unexcoff.c.
 etc/AUTHORS: Rename unexec.o => unexcoff.o.
 etc/PROBLEMS: Rename unexec.o => unex*.o.
 lisp/emacs-lisp/find-gc.el (find-gc-source-files): Rename
 unexec.c => unexcoff.c.
 lisp/emacs-lisp/authors.el (authors-fixed-entries): Rename
 unexec.c => unexcoff.c.
 msdos/sed1v2.inp (UNEXEC_OBJ): Edit to unexcoff.o, due to renaming of
 unexec.c => unexcoff.c.
2010-08-05 20:11:32 +03:00
Stefan Monnier
0798a8d85c * lisp/emacs-lisp/timer.el (timer-event-handler): Protect against timers
that change current buffer.
2010-08-02 11:00:46 +02:00
Chong Yidong
376c2b6b21 Package listing tweaks.
* emacs-lisp/package.el (package--list-packages): Fix column
alignment.
(package--builtins): Tweak descriptions.
(package-print-package): Upcase descriptions if necessary.  Show
all built-in packages in font-lock-builtin-face.
(package-list-packages-internal): Omit "emacs" package.  Show
status of built-in packages as "built-in".
2010-07-31 20:38:19 -04:00
MON KEY
9aea20c9f8 * lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Fix typo in docstring.
Fixes: debbugs:6747
2010-08-01 02:24:55 +02:00
Chong Yidong
063e52940d Update package-x to latest package.el changes.
* emacs-lisp/package-x.el (package--make-rss-entry):
(package-maint-add-news-item, package--update-news)
(package-upload-buffer-internal): New arg ARCHIVE-URL.

* emacs-lisp/package.el (package-archive-url): Rename from
package-archive-id.
(package-install): Doc fix.
(package-download-single, package-download-tar, package-install)
(package-menu-view-commentary): Callers changed.
2010-07-29 12:01:14 -04:00
Phil Hagelberg
bc44bef767 Add support for non-default package repositories.
* lisp/emacs-lisp/package.el (package-archive-base): Var deleted.
(package-archives): New variable.
(package-archive-contents): Doc fix.
(package-load-descriptor): Do nothing if descriptor file is
missing.
(package--write-file-no-coding): New function.
(package-unpack-single): Use it.
(package-archive-id): New function.
(package-download-single, package-download-tar)
(package-menu-view-commentary): Use it.
(package-installed-p): Make second argument optional.
(package-read-all-archive-contents): New function.
(package-initialize): Use it.
(package-read-archive-contents): Add ARCHIVE argument.
(package--add-to-archive-contents): New function.
(package-install): Don't call package-read-archive-contents.
(package--download-one-archive): Store archive file in a
subdirectory of package-user-dir.
(package-menu-execute): Remove spurious line movement.

* lisp/emacs-lisp/package.el (package-load-list, package-archives)
(package-archive-contents, package-user-dir)
(package-directory-list, package--builtins, package-alist)
(package-activated-list, package-obsolete-alist): Mark as risky.
2010-07-28 14:54:42 -04:00
Aaron S. Hawley
128440c97f * emacs-lisp/re-builder.el: Remove references to package `lisp-re' (bug#4369). 2010-07-28 01:38:46 +02:00
Aleksei Gusev
dce3463576 Add compilation regexps for cucumber and ruby.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add
regexps for cucumber and ruby.
2010-07-10 15:47:59 -04:00
Chong Yidong
2ec1b5ee34 Merge changes from emacs-23 branch. 2010-07-10 14:52:53 -04:00
Leo Liu
a354ac6a0c emacs-lisp/rx.el (rx): Doc fix. (Bug#6537) 2010-06-29 14:09:07 +02:00
Andreas Schwab
15b72850c1 Update cl-loaddefs.el 2010-06-26 20:49:18 +02:00
Chong Yidong
8adb4c33da Tweaks to package list UI.
* help-mode.el (help-package): New button type.

* emacs-lisp/package.el (package-print-package): Add link to
package description via describe-package.
(describe-package-1): List package requirements.  Add button to
perform installation.
(package-menu-describe-package): New command.
2010-06-20 00:55:14 -04:00
Chong Yidong
cced75847f Add preliminary describe-package functionality, and some cleanup.
* help-mode.el (help-package-def): New button type.

* menu-bar.el: Move package-list-packages binding here from
package.el.

* emacs-lisp/package.el: Move package-list-packages binding to
menu-bar.el.
(describe-package, describe-package-1, package--dir): New funs.
(package-activate-1): Use package--dir.

* emacs-lisp/package-x.el (gnus-article-buffer): Require package.
2010-06-19 18:36:51 -04:00
Stefan Monnier
b1a03ef6bf * lisp/emacs-lisp/edebug.el (edebug-read-list): Phase out old-style backquotes. 2010-06-18 10:05:43 -04:00
Dan Nicolaescu
64eba874f5 * lisp/emacs-lisp/package.el (package-menu-mode-map): Add a menu. 2010-06-17 09:41:13 -07:00
Juanma Barranquero
54ea2a0d41 emacs-lisp/package.el (package-menu-mode-map): Move initialization into declaration. 2010-06-17 13:02:42 +02:00
Chong Yidong
44198b6ee9 Merge package.el, written by Tom Tromey <tromey@redhat.com>.
Changes relative to version 0.9 of package.el are listed below:

* emacs-lisp/package-x.el: New file.  Package uploading
functionality split out from package.el.

* emacs-lisp/package.el (package-archive-base): Point to
elpa.gnu.org.
(package-enable, package-load-list): New defcustoms.
(package-user-dir, package-directory-list): Turn into defcustoms.
Don't include package-user-dir in package-directory-list.
(package--builtins-base): Don't include Emacs as a "package".
(package-subdirectory-regexp): New var.
(package-load-all-descriptors, package-compute-transaction)
(package-download-transaction): Obey package-load-list.
(package-activate-1): Rename from package-do-activate.
(package-list-packages-internal): Check package-load-list.
(package-load-descriptor, package-generate-autoloads)
(package-unpack, package-unpack-single)
(package--read-archive-file, package-delete): Use
expand-file-name.

* startup.el (command-line): Load packages after reading init
file.
2010-06-16 22:08:10 -04:00