1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-02 11:21:42 +00:00
Commit Graph

2994 Commits

Author SHA1 Message Date
Stefan Monnier
872ab16459 * lisp/emacs-lisp/pcase.el: Improve pcase-let. Use "pcase--" prefix.
(pcase--dontcare-upats): New var.
(pcase-let, pcase-let*): Generate better code.
Accept the same bodies as `let'.
(pcase-dolist): New macro.
(pcase--trivial-upat-p): New helper function.
(pcase--expand): Strip leading "(let nil" if any.
2010-11-24 11:39:51 -05:00
Glenn Morris
c11cc37a0a Tiny authors.el updates.
* lisp/emacs-lisp/authors.el (authors-ignored-files)
(authors-valid-file-names, authors-renamed-files-alist): Add entries.
2010-11-20 14:27:56 -08:00
Stefan Monnier
4a47c27573 Merge from emacs-23 2010-11-17 22:54:14 -05:00
Stefan Monnier
e2f454c4be * emacs-lisp/smie.el (smie-bnf-classify): Signal errors for tokens
that are both openers (resp. closers) and something else.
(smie-grammar): Loosen definition of valid values.
(smie-next-sexp, smie-down-list, smie-blink-matching-open)
(smie-indent--parent, smie-rule-parent, smie-indent-keyword)
(smie-indent-after-keyword): Adjust users.
(smie-indent-keyword): Don't indent empty lines.
2010-11-17 14:59:16 -05:00
Glenn Morris
4c0eb0d3db autoload.el fix for bug#7414.
* lisp/emacs-lisp/autoload.el (autoload-find-destination): The
function coding-system-eol-type may return non-numeric values.
2010-11-16 19:47:16 -08:00
Stefan Monnier
cca982d001 * lisp/emacs-lisp/checkdoc.el (checkdoc-syntax-table): Fix last change.
(checkdoc-sentencespace-region-engine, checkdoc-this-string-valid)
(checkdoc-proper-noun-region-engine): Use with-syntax-table.
2010-11-15 16:40:30 -05:00
Glenn Morris
7847454adc bytecomp trivia.
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-buffer): New constant.
Use it to replace all instances of "*Compile-Log*"
2010-11-11 19:21:38 -08:00
Stefan Monnier
aa31025710 * lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): Add debug and
indentation specs.
2010-11-11 20:35:06 -05:00
Stefan Monnier
10b40d2ef6 * lisp/emacs-lisp/smie.el (smie-prec2->grammar): Obey equality constraints
when filling the remaining "unconstrained" values.
2010-11-11 20:33:28 -05:00
Stefan Monnier
acef0722fc * lisp/files.el (safe-local-variable-p): Gracefully handle errors.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
safety predicate.
2010-11-11 17:19:01 -05:00
Stefan Monnier
7bea8c7a92 * lisp/emacs-lisp/smie.el (smie-rule-parent, smie-indent--rule):
Use smie-indent-virtual when indenting relative to an opener.
(smie-rule-separator): Use smie-rule-parent.
(smie-indent-keyword): Consult rules, even for openers at bol.
(smie-indent-comment-close): Try to align closer's content.
2010-11-11 00:08:25 -05:00
Chong Yidong
fbe3be3fa2 Minor fix to package-archive-contents recalculation.
lisp/emacs-lisp/package.el (package-read-all-archive-contents): Reset
package-archive-contents to nil before re-reading.
2010-11-10 16:35:06 -05:00
Stefan Monnier
d607b96bc2 Merge from emacs-23 2010-11-09 15:07:10 -05:00
Stefan Monnier
1398b795ef * lisp/emacs-lisp/checkdoc.el (checkdoc-display-status-buffer)
(checkdoc-interactive-loop, checkdoc-recursive-edit): Avoid princ-list.
(checkdoc-syntax-table): Initialize in the declaration.
(emacs-lisp-mode-hook): Use just checkdoc-minor-mode now that it turns
the mode on unconditionally.
2010-11-08 15:01:01 -05:00
Stefan Monnier
db94771e23 * lisp/emacs-lisp/cl-macs.el (extent-data, extent-face, extent-priority)
(extent-end-position, extent-start-position): Remove setf method for
non-existing functions.

Fixes: debbugs:7319
2010-11-08 14:09:21 -05:00
Stefan Monnier
7f925a67c1 * lisp/emacs-lisp/smie.el: New package. 2010-11-07 10:52:33 -05:00
Stefan Monnier
674728d4e3 * lisp/emacs-lisp/smie.el: Simplify the smie-rules-function return values.
(smie-precs->prec2): Rename from smie-precs-precedence-table.
(smie-bnf->prec2): Rename from smie-bnf-precedence-table.
(smie-prec2->grammar): Rename from smie-prec2-levels.
(smie-grammar): Rename from smie-op-levels.
(smie-indent--hanging-p): Rename from smie-hanging-p.
(smie-rule-hanging-p): New alias.
(smie-indent--bolp): Rename from smie-bolp.
(smie-indent--hanging-p): New alias.
(smie--token): New dynamically bound variable.
(smie-indent--parent): New function.
(smie-rule-parent-p): Use it; rename from smie-parent-p.
(smie-rule-next-p): Rename from smie-next-p.
(smie-rule-prev-p): Rename from smie-prev-p.
(smie-rule-sibling-p, smie-rule-parent)
(smie-indent--separator-outdent, smie-rule-separator): New functions.
(smie-rule-separator-outdent): New var.
(smie-indent--rule): Merge with smie-indent--column.
(smie-indent-forward-token, smie-indent-backward-token):
Also recognize close parens.
(smie-indent-keyword): Don't use smie-indent--column any more.
(smie-indent-after-keyword): Ignore closers by default.
(smie-indent-line): Use with-demoted-errors.
* lisp/progmodes/octave-mod.el (octave-smie-grammar):
Rename from octave-smie-op-levels.
(octave-smie-rules): Adjust to new behavior.
* lisp/progmodes/prolog.el (prolog-smie-grammar):
Rename from prolog-smie-op-levels.
2010-11-07 10:45:45 -05:00
Glenn Morris
76fc02b654 Minor checkdoc simplifications.
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Use end-of-line N.
(checkdoc-this-string-valid-engine, checkdoc-file-comments-engine):
Use line-end-position.
2010-11-06 18:44:13 -07:00
Glenn Morris
e180ab9fde Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.

* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.

* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.

* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
Glenn Morris
5ed619e0a3 Use line-end-position rather than end-of-line, etc.
* textmodes/texnfo-upd.el (texinfo-start-menu-description)
(texinfo-update-menu-region-beginning, texinfo-menu-first-node)
(texinfo-delete-existing-pointers, texinfo-find-pointer)
(texinfo-clean-up-node-line, texinfo-insert-node-lines)
(texinfo-multiple-files-update):
* textmodes/table.el (table--probe-cell-left-up)
(table--probe-cell-right-bottom):
* textmodes/picture.el (picture-tab-search):
* textmodes/page-ext.el (pages-copy-header-and-position)
(pages-directory-for-addresses):
* progmodes/vera-mode.el (vera-get-offset):
* progmodes/simula.el (simula-calculate-indent):
* progmodes/python.el (python-pdbtrack-overlay-arrow):
* progmodes/prolog.el (end-of-prolog-clause):
* progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp):
* progmodes/icon.el (indent-icon-exp):
* progmodes/etags.el (tag-re-match-p):
* progmodes/ebrowse.el (ebrowse-show-file-name-at-point):
* progmodes/ebnf2ps.el (ebnf-begin-file):
* progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-save-local-variable):
* play/life.el (life-setup):
* play/gametree.el (gametree-looking-at-ply):
* nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* mail/sendmail.el (mail-mode-auto-fill):
* emacs-lisp/lisp-mode.el (calculate-lisp-indent):
* emacs-lisp/edebug.el (edebug-overlay-arrow):
* emacs-lisp/checkdoc.el (checkdoc-this-string-valid):
* woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH)
(woman-tab-to-tab-stop, WoMan-warn-ignored):
* type-break.el (type-break-file-keystroke-count):
* term.el (term-replace-by-expanded-history-before-point)
(term-skip-prompt, term-extract-string):
* speedbar.el (speedbar-edit-line, speedbar-expand-line)
(speedbar-contract-line, speedbar-toggle-line-expansion)
(speedbar-parse-c-or-c++tag, speedbar-parse-tex-string)
(speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line):
* sort.el (sort-skip-fields):
* skeleton.el (skeleton-internal-list):
* simple.el (line-move-finish, line-move-to-column):
* shell.el (shell-forward-command):
* misc.el (copy-from-above-command):
* makesum.el (double-column):
* ebuff-menu.el (electric-buffer-update-highlight):
* dired.el (dired-move-to-end-of-filename):
* dframe.el (dframe-popup-kludge):
* bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames):
* arc-mode.el (archive-get-lineno):
Use line-end-position and line-beginning-position.

* net/ange-ftp.el, progmodes/hideif.el, reposition.el:
Same, but only in comments.
2010-11-06 13:23:42 -07:00
Glenn Morris
4e44448fcd Minor eieio-comp changes.
* lisp/emacs-lisp/eieio-comp.el (byte-compile-file-form-defmethod):
Use boundp tests to silence compiler.  Update for changed name of
bytecomp-filename variable.
2010-11-06 12:47:42 -07:00
Glenn Morris
79d1dabe00 Silence elint compilation.
* lisp/emacs-lisp/elint.el (elint-init-env): Prefix dynamic local `env'.
(elint-init-form): Update for above name change.
2010-11-06 12:40:33 -07:00
Jan Djärv
80417b95f4 * src/nsfont.m: Include termchar for new mouse-highlight. 2010-11-06 10:33:22 +01:00
Glenn Morris
215461a8d3 Silence cl-macs.el compilation.
* lisp/emacs-lisp/cl-macs.el (loop): Give local variable args a prefix.
(cl-parse-loop-clause, cl-loop-handle-accum): Update for above change.
2010-11-05 00:34:45 -07:00
Glenn Morris
17fc58c923 Silence byte-opt.el compilation.
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Give local
variables bytes, ptr, op a prefix.
(disassemble-offset): Update for above change.
2010-11-05 00:32:16 -07:00
Chong Yidong
015eea5996 * emacs-lisp/package.el (package-unpack): Remove no-op.
(package--builtins, package--dir): Doc fix.
(package-activate-1, package-activate, package-install)
(package-compute-transaction): Fix error message.
(package-delete): Use delete-directory.  Omit system packages.
(package-initialize): Set package-alist to nil first.
(package-menu-mark-delete, package-menu-mark-install): Don't add
symbols that are inconsistent with the package state.
(package-menu-execute): Perform deletions and installations as
single batch operations.
2010-11-03 19:21:51 -04:00
Glenn Morris
537b04b96a Don't be so lax with spelling.
* lisp/net/dbus.el (dbus-name-owner-changed-handler): Doc fix.

* doc/misc/ediff.texi (Quick Help Commands, Miscellaneous): Spelling fix.
2010-11-02 20:49:04 -07:00
Chong Yidong
4b99edf23f Separate built-in packages from elpa packages, for efficiency.
* emacs-lisp/package.el: Don't put built-in packages in
package-alist, to avoid loading inefficiencies.
(package-built-in-p): Make VERSION optional, and treat it as a
minimum acceptable version.
(package-activate): Search separately for built-in packages.  Emit
a warning if a dependency fails.
(define-package): Handle most common case, where there is no
obsolete package, first.
(package-compute-transaction): Print required version in error.
(package--initialized): New variable.
(list-packages): Use it.
(package-initialize): Optional arg NO-ACTIVATE.  Don't put
built-in packages in packages-alist; keep it separate.  Set
package--initialized.
(describe-package): Avoid activating packages as a side-effect.
Search separately for built-in packages.
(describe-package-1): Handle the case where an elpa package is
simultaneously built-in and available/installed.
(package-installed-p, package--generate-package-list): Search
separately for built-in packages.
(package-load-descriptor): Doc fix.
2010-11-02 23:25:36 -04:00
Noah Friedman
fa14dc1800 (byte-recompile-file): If bytecomp-arg is nil, do not ask to recompile files that are not already compiled, and do not recompile them. 2010-11-02 15:51:25 -07:00
Chong Yidong
be577d03d7 Fix last change to package.el. 2010-11-01 22:30:50 -04:00
Chong Yidong
0f75c62ae3 Two fixes for elpa packages overriding built-in ones.
* emacs-lisp/package.el (package-initialize): Ensure that
obsoleted built-in packages are not in package-activated-list
during activation.
(describe-package-1): Make the "installed" status override
"built-in".
2010-11-01 21:50:26 -04:00
Glenn Morris
c79fc059c9 * lisp/emacs-lisp/smie.el (smie): New custom group.
(smie-blink-matching-inners, smie-indent-basic): Add :group.
2010-10-31 23:44:54 -07:00
Glenn Morris
feb5e60ae7 * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Fix previous change. 2010-10-31 19:55:12 -07:00
Julien Danjou
430e7297cb * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): New fun.
(byte-recompile-directory):
* lisp/emacs-lisp/lisp-mode.el (emacs-lisp-byte-compile-and-load):
* cedet/ede/proj-elisp.el (project-compile-target):
* cedet/semantic/ede-grammar.el (project-compile-target):
Use `byte-recompile-file'.

Fixes: debbugs:7297
2010-10-31 15:25:39 -04:00
Chong Yidong
8a500a91a2 Check more carefully for packages before loading package.el.
* startup.el (command-line): Search for package directories, and
don't load package.el if none are found.

* emacs-lisp/package.el (describe-package, list-packages): Call
package-initialize if it has not been called yet.
2010-10-30 20:06:18 -04:00
Stefan Monnier
c4d17d50ea SMIE: change indent rules format, improve smie-setup.
* lisp/emacs-lisp/smie.el (smie-precs-precedence-table)
(smie-merge-prec2s, smie-bnf-precedence-table, smie-prec2-levels):
Mark them pure so the tables gets built at compile time.
(smie-bnf-precedence-table): Store the closer-alist in the table.
(smie-prec2-levels): Preserve the closer-alist.
(smie-blink-matching-open): Be more forgiving in case of indentation.
(smie-hanging-p): Rename from smie-indent--hanging-p.
(smie-bolp): Rename from smie-indent--bolp.
(smie--parent, smie--after): New dynamic vars.
(smie-parent-p, smie-next-p, smie-prev-p): New funs.
(smie-indent-rules): Remove.
(smie-indent--offset-rule): Remove fun.
(smie-rules-function): New var.
(smie-indent--rule): New fun.
(smie-indent--offset, smie-indent-keyword, smie-indent-after-keyword)
(smie-indent-exps): Use it.
(smie-setup): Setup paren blinking; add keyword args for token
functions; extract closer-alist from op-levels.
(smie-indent-debug-log): Remove var.
(smie-indent-debug): Remove fun.
* lisp/progmodes/prolog.el (prolog-smie-indent-rules): Remove.
(prolog-smie-rules): New fun to replace it.
(prolog-mode-variables): Simplify.
* lisp/progmodes/octave-mod.el (octave-smie-closer-alist): Remove, now that
it's setup automatically.
(octave-smie-indent-rules): Remove.
(octave-smie-rules): New fun to replace it.
(octave-mode): Simplify.
2010-10-29 15:20:28 -04:00
Glenn Morris
9d79402605 Remove duplicate Lisp definitions of define-minor-mode variables defined in C.
* lisp/abbrev.el (abbrev-mode):
* lisp/composite.el (auto-composition-mode):
* lisp/menu-bar.el (menu-bar-mode):
* lisp/simple.el (transient-mark-mode):
* lisp/tool-bar.el (tool-bar-mode): Adjust the define-minor-mode calls so
that they do not define the associated variables twice.
* lisp/simple.el (transient-mark-mode): Remove defvar.
* lisp/composite.el (auto-composition-mode): Make variable auto-buffer-local.
* lisp/cus-start.el: Add transient-mark-mode, menu-bar-mode, tool-bar-mode.
Handle multiple groups, and also custom-delayed-init-variables.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.

* src/buffer.c (syms_of_buffer) <abbrev-mode, transient-mark-mode>:
* src/frame.c (syms_of_frame) <tool-bar-mode>: Move docs here from Lisp.
2010-10-28 20:29:29 -07:00
Stefan Monnier
dcc029e017 * lisp/emacs-lisp/pcase.el (pcase): New string' and guard' patterns.
(pcase-if): Add one minor optimization.
(pcase-split-equal): Rename from pcase-split-eq.
(pcase-split-member): Rename from pcase-split-memq.
(pcase-u1): Add strings to the member optimization.
Add `guard' variant of predicates.
(pcase-q1): Add string patterns.
2010-10-28 21:05:38 -04:00
Chong Yidong
43207249e0 * package.el (package-menu-mode-map): Inherit from button-buffer-map. 2010-10-24 11:46:21 -04:00
Chong Yidong
484db896fa Fix last commit. 2010-10-24 11:39:32 -04:00
Chong Yidong
f34e6aaaf8 Make the *Packages* buffer read-only.
* emacs-lisp/package.el (package--generate-package-list): Make the
*Packages* buffer read-only.
2010-10-24 11:37:21 -04:00
Glenn Morris
9a0dd02d20 Support for systems without floats was removed a decade ago.
* lisp/loadup.el: Unconditionally load float-sup.
* lisp/paren.el (show-paren-delay):
* lisp/emacs-lisp/float-sup.el:
* lisp/emulation/cua-base.el (cua-prefix-override-inhibit-delay):
* lisp/obsolete/lazy-lock.el (lazy-lock-defer-time, lazy-lock-stealth-nice)
(lazy-lock-stealth-verbose): Assume float support.
* lisp/ps-print.el: Assume float support on Emacs.
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Remove non-float branch.

* lisp/obsolete/lazy-lock.el: Remove leading `*' from defcustom docs.
2010-10-21 21:03:55 -07:00
Glenn Morris
69b5513153 Small autoloads fix.
* lisp/emacs-lisp/autoload.el (batch-update-autoloads): Update for
src/Makefile no longer being pre-processed.
2010-10-21 20:32:46 -07:00
Stefan Monnier
7c23d9e85b * lisp/emacs-lisp/find-func.el (find-library): Use test-completion. 2010-10-21 23:17:26 -04:00
Juanma Barranquero
ca3fa30248 Merge changes from emacs-23 branch. 2010-10-19 13:44:07 +02:00
Chong Yidong
a8c41b4c0d Don't allow functions that display messages in unsafep.
* emacs-lisp/unsafep.el: Don't mark functions that display
messages as safe.  Suggested by Johan Bockgård.
2010-10-18 13:28:20 -04:00
Stefan Monnier
a7769c3060 (regexp-opt-group, regexp-opt-charset): Turn comments into docstrings 2010-10-17 14:59:58 -04:00
Juanma Barranquero
220d91b834 Merge changes from emacs-23 branch. 2010-10-14 16:32:27 +02:00
Juanma Barranquero
c0943d3db2 Fix typos in docstrings, comments and ChangeLogs.
* etc/tutorials/TUTORIAL.es: Fix typos.

* lisp/cedet/semantic/symref/list.el (semantic-symref-list-rename-open-hits):
  Fix typo in message.
  (semantic-symref-list-map-open-hits): Fix typo in docstring.

* lisp/erc/erc-xdcc.el (erc-xdcc-help-text): Fix typo in docstring.

* lisp/gnus/nnmail.el (nnmail-fancy-expiry-targets): Fix typo in docstring.

* lisp/international/mule.el (define-coding-system):
* lisp/international/titdic-cnv.el (quail-cxterm-package-ext-info):
* composite.el (compose-region): Fix typo in docstring.

* lisp/org/org-agenda.el (org-prefix-category-length)
  (org-prefix-category-max-length): Fix typos in docstrings.

* src/font.c (Ffont_variation_glyphs):
* ccl.c (Fccl_execute_on_string): Fix typo in docstring.
2010-10-13 01:25:19 +02:00
Juanma Barranquero
4c14013dbe Merge changes from emacs-23 branch. 2010-10-12 01:57:49 +02:00