1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

101 Commits

Author SHA1 Message Date
Chong Yidong
6b8bc57071 Merge changes from emacs-23 branch 2011-04-08 14:53:26 -04:00
Glenn Morris
b605679c8e log-edit.el fix for bug#7598.
* lisp/vc/log-edit.el (log-edit-empty-buffer-p): New function.
(log-edit-insert-cvs-template, log-edit-insert-cvs-rcstemplate):
Use log-edit-empty-buffer-p.
2011-04-07 20:21:30 -07:00
Stefan Monnier
034086489c Merge from lexical-binding branch.
* doc/lispref/eval.texi (Eval): Discourage the use of `eval'.
Document its new `lexical' argument.

* doc/lispref/variables.texi (Defining Variables): Mention the new meaning of `defvar'.
(Lexical Binding): New sub-section.

* lisp/Makefile.in (BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS):
New variables.
(compile-onefile, .el.elc, compile-calc, recompile): Use them.
(COMPILE_FIRST): Add macroexp and cconv.
* lisp/makefile.w32-in: Mirror changes in Makefile.in.

* lisp/vc/cvs-status.el:
* lisp/vc/diff-mode.el:
* lisp/vc/log-edit.el:
* lisp/vc/log-view.el:
* lisp/vc/smerge-mode.el:
* lisp/textmodes/bibtex-style.el:
* textmodes/css.el:
* lisp/startup.el:
* lisp/uniquify.el:
* lisp/minibuffer.el: 
* lisp/newcomment.el: 
* lisp/reveal.el: 
* lisp/server.el: 
* lisp/mpc.el: 
* lisp/emacs-lisp/smie.el: 
* lisp/doc-view.el: 
* lisp/dired.el: 
* lisp/abbrev.el: Use lexical binding.

* lisp/custom.el (custom-initialize-default, custom-declare-variable):
Use `defvar'.

* lisp/files.el (lexical-binding): Declare safe.

* lisp/help-fns.el (help-split-fundoc): Return nil if there's nothing else
than the arglist.
(help-add-fundoc-usage): Don't add `Not documented'.
(help-function-arglist): Handle closures, subroutines, and new
byte-code-functions.
(help-make-usage): Remove leading underscores.
(describe-function-1): Handle closures.
(describe-variable): Use special-variable-p for completion.

* lisp/simple.el (with-wrapper-hook, apply-partially): Move to subr.el.

* lisp/subr.el (apply-partially): Use new closures rather than CL.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamic.
(dolist, dotimes): Use slightly different expansion for lexical code.
(functionp): Move to C.
(letrec): New macro.
(with-wrapper-hook): Use it and apply-partially instead of CL.
(eval-after-load): Preserve lexical-binding.
(save-window-excursion, with-output-to-temp-buffer): Turn them
into macros.

* lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist.

* lisp/emacs-lisp/autoload.el (make-autoload): Don't burp on trivial macros.

* lisp/emacs-lisp/byte-opt.el: Use lexical binding.
(byte-inline-lapcode): Remove (to bytecomp).
(byte-compile-inline-expand): Pay attention to inlining to/from
lexically bound code.
(byte-compile-unfold-lambda): Don't handle byte-code-functions
any more.
(byte-optimize-form-code-walker): Don't handle save-window-excursion
any more and don't call compiler-macros.
(byte-compile-splice-in-already-compiled-code): Remove.
(byte-code): Don't inline any more.
(disassemble-offset): Receive `bytes' as argument rather than via
dynamic scoping.
(byte-compile-tag-number): Declare before first use.
(byte-decompile-bytecode-1): Handle new byte-codes, don't change
`return' even if make-spliceable.
(byte-compile-side-effect-and-error-free-ops): Add stack-ref, remove
obsolete interactive-p.
(byte-optimize-lapcode): Optimize new lap-codes.
Don't trip up on new form of `byte-constant' lap code.

* lisp/emacs-lisp/byte-run.el (make-obsolete): Don't set the `byte-compile'
handler any more.

* lisp/emacs-lisp/bytecomp.el: Use lexical binding instead of
a "bytecomp-" prefix.  Macroexpand everything as a separate phase.
(byte-compile-initial-macro-environment):
Handle declare-function here.
(byte-compile--lexical-environment): New var.
(byte-stack-ref, byte-stack-set, byte-discardN)
(byte-discardN-preserve-tos): New lap codes.
(byte-interactive-p): Don't use any more.
(byte-compile-push-bytecodes, byte-compile-push-bytecode-const2):
New macros.
(byte-compile-lapcode): Use them and handle new lap codes.
(byte-compile-obsolete): Remove.
(byte-compile-arglist-signature): Handle new byte-code arg"lists".
(byte-compile-arglist-warn): Check late def of inlinable funs.
(byte-compile-cl-warn): Don't silence warnings for compiler-macros
since they should have been expanded by now.
(byte-compile--outbuffer): Rename from bytecomp-outbuffer.
(byte-compile-from-buffer): Remove unused second arg.
(byte-compile-preprocess): New function.
(byte-compile-toplevel-file-form): New function to distinguish
file-form calls from outside from file-form calls from hunk-handlers.
(byte-compile-file-form): Simplify.
(byte-compile-file-form-defsubst): Remove.
(byte-compile-file-form-defmumble): Simplify now that
byte-compile-lambda always returns a byte-code-function.
(byte-compile): Preprocess.
(byte-compile-byte-code-maker, byte-compile-byte-code-unmake):
Remove, not used any more.
(byte-compile-arglist-vars, byte-compile-make-lambda-lexenv)
(byte-compile-make-args-desc): New funs.
(byte-compile-lambda): Handle lexical functions.  Always return
a byte-code-function.
(byte-compile-reserved-constants): New var, to make up room for
closed-over variables.
(byte-compile-constants-vector): Obey it.
(byte-compile-top-level): New args `lexenv' and `reserved-csts'.
(byte-compile-macroexpand-declare-function): New function.
(byte-compile-form): Call byte-compile-unfold-bcf to inline immediate
byte-code-functions.
(byte-compile-form): Check obsolescence here.
(byte-compile-inline-lapcode, byte-compile-unfold-bcf): New functions.
(byte-compile-variable-ref): Remove.
(byte-compile-dynamic-variable-op): New fun.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): New funs.
(byte-compile-discard): Add 2 args.
(byte-compile-stack-ref, byte-compile-stack-set)
(byte-compile-make-closure, byte-compile-get-closed-var): New funs.
(byte-compile-funarg, byte-compile-funarg-2): Remove, handled in
macroexpand-all instead.
(byte-compile-quote-form): Remove.
(byte-compile-push-binding-init, byte-compile-not-lexical-var-p)
(byte-compile-bind, byte-compile-unbind): New funs.
(byte-compile-let): Handle let* and lexical binding.
(byte-compile-let*): Remove.
(byte-compile-catch, byte-compile-unwind-protect)
(byte-compile-track-mouse, byte-compile-condition-case):
Handle a new :fun-body form, used for lexical scoping.
(byte-compile-save-window-excursion)
(byte-compile-with-output-to-temp-buffer): Remove.
(byte-compile-defun): Simplify.
(byte-compile-stack-adjustment): New fun.
(byte-compile-out): Use it.
(byte-compile-refresh-preloaded): Don't reload byte-compiler files.

* lisp/emacs-lisp/cconv.el: New file.

* lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Properly quote CL
closures.

* lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block)
(cl-byte-compile-throw): Remove.
(cl-block-wrapper, cl-block-throw): Use compiler-macros instead.

* lisp/emacs-lisp/cl.el (pushnew): Silence warning.

* lisp/emacs-lisp/disass.el (disassemble-internal): Handle new
`closure' objects.
(disassemble-1): Handle new byte codes.

* lisp/emacs-lisp/edebug.el (edebug-eval-defun)
(edebug-eval-top-level-form): Use eval-sexp-add-defvars.
(edebug-toggle): Avoid `eval'.

* lisp/emacs-lisp/eieio-comp.el: Remove.

* lisp/emacs-lisp/eieio.el (byte-compile-file-form-defmethod):
Don't autoload.
(eieio-defgeneric-form-primary-only-one): Use `byte-compile' rather
than the internal `byte-compile-lambda'.
(defmethod): Don't hide code under quotes.
(eieio-defmethod): New `code' argument.

* lisp/emacs-lisp/float-sup.el (pi): Don't declare as dynamically bound.

* lisp/emacs-lisp/lisp-mode.el (eval-last-sexp-1):
Use eval-sexp-add-defvars.
(eval-sexp-add-defvars): New fun.

* lisp/emacs-lisp/macroexp.el: Use lexical binding.
(macroexpand-all-1): Check obsolete macros.  Expand compiler-macros.
Don't convert ' to #' without checking that it's indeed quoting
a lambda.

* lisp/emacs-lisp/pcase.el: Don't use destructuring-bind.
(pcase--memoize): Rename from pcase-memoize.  Change weakness.
(pcase): Add `let' pattern.
Change memoization so it actually works.
(pcase-mutually-exclusive-predicates): Add byte-code-function-p.
(pcase--u1) <guard, pred>: Fix possible shadowing problem.
<let>: New case.

* src/alloc.c (Fmake_symbol): Init new `declared_special' field.

* src/buffer.c (defvar_per_buffer): Set new `declared_special' field.

* src/bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
New byte-codes.
(exec_byte_code): New function extracted from Fbyte_code to handle new
calling convention for byte-code-functions.  Add new byte-codes.

* src/callint.c (Fcall_interactively): Preserve lexical-binding mode for
interactive spec.

* src/doc.c (Fdocumentation, store_function_docstring):
* src/data.c (Finteractive_form): Handle closures.

* src/eval.c (Fsetq): Handle lexical vars.
(Fdefun, Fdefmacro, Ffunction): Make closures when needed.
(Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
(FletX, Flet): Obey lexical binding.
(Fcommandp): Handle closures.
(Feval): New `lexical' arg.
(eval_sub): New function extracted from Feval.  Use it almost
everywhere where Feval was used.  Look up vars in lexical env.
Handle closures.
(Ffunctionp): Move from subr.el.
(Ffuncall): Handle closures.
(apply_lambda): Remove `eval_flags'.
(funcall_lambda): Handle closures and new byte-code-functions.
(Fspecial_variable_p): New function.
(syms_of_eval): Initialize the Vinternal_interpreter_environment var,
but without exporting it to Lisp.

* src/fns.c (concat, mapcar1): Accept byte-code-functions.

* src/image.c (parse_image_spec): Use Ffunctionp.

* src/keyboard.c (eval_dyn): New fun.
(menu_item_eval_property): Use it.

* src/lisp.h (struct Lisp_Symbol): New field `declared_special'.

* src/lread.c (lisp_file_lexically_bound_p): New function.
(Fload): Bind Qlexical_binding.
(readevalloop): Remove `evalfun' arg.
Bind Qinternal_interpreter_environment.
(Feval_buffer): Bind Qlexical_binding.
(defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
Mark as dynamic.
(syms_of_lread): Declare `lexical-binding'.

* src/window.c (Ftemp_output_buffer_show): New fun.
(Fsave_window_excursion):
* src/print.c (Fwith_output_to_temp_buffer): Move to subr.el.
2011-04-01 13:19:52 -04:00
Stefan Monnier
40d83b412f Merge from trunk 2011-03-31 00:24:03 -04:00
Jason Merrill
f3e4086c9d * lisp/vc/add-log.el (add-change-log-entry): Don't use whitespace
syntax class to search for whitespace on a single line
(Message-ID: <4D938140.4030905@redhat.com>).
2011-03-30 17:56:04 -04:00
Stefan Monnier
cafdcef32d Merge from trunk 2011-03-21 12:42:16 -04:00
Leo Liu
810f76988a Remove leftover (require 'wid-edit) 2011-03-21 23:26:05 +08:00
Chong Yidong
b14e3e21ec Merge changes from emacs-23 branch 2011-03-19 14:49:31 -04:00
Stefan Monnier
a904a09a8b * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
diff-mode-shared-map.
(diff-mode-shared-map): Re-introduce some bindings that were problematic.

Fixes: debbugs:8284
2011-03-18 15:52:05 -04:00
Stefan Monnier
0adf561883 Fix misuse of quote in `case'.
* lisp/progmodes/ruby-mode.el (ruby-backward-sexp):
* lisp/progmodes/ebrowse.el (ebrowse-draw-file-member-info):
* lisp/play/gamegrid.el (gamegrid-make-face):
* lisp/play/bubbles.el (bubbles--grid-width, bubbles--grid-height)
(bubbles--colors, bubbles--shift-mode, bubbles--initialize-images):
* lisp/notifications.el (notifications-notify):
* lisp/net/xesam.el (xesam-search-engines):
* lisp/net/quickurl.el (quickurl-list-insert):
* lisp/vc/vc-hg.el (vc-hg-dir-printer): Fix use of case.
* lisp/gnus/auth-source.el (auth-source-netrc-create):
* lisp/gnus/message.el (message-yank-original): Fix use of `case'.
* lisp/org/org-src.el (org-src-switch-to-buffer):
* lisp/org/org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot):
* lisp/org/org-mouse.el (org-mouse-agenda-type):
* lisp/org/org-freemind.el (org-freemind-node-to-org):
* lisp/org/ob-sql.el (org-babel-execute:sql):
* lisp/org/ob-exp.el (org-babel-exp-do-export, org-babel-exp-code):
* lisp/org/ob-ref.el (org-babel-ref-resolve): Fix use of case.
2011-03-15 13:39:56 -04:00
Juanma Barranquero
70620cbe32 lisp/vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). 2011-03-12 16:26:33 +01:00
Stefan Monnier
ba83908c4b Misc fixes, and use lexical-binding in more files.
* lisp/subr.el (letrec): New macro.
(with-wrapper-hook): Move from lisp/simple.el and don't use CL.
* simple.el (with-wrapper-hook): Move with-wrapper-hook to subr.el.
* lisp/help-fns.el (help-function-arglist): Handle subroutines as well.
(describe-variable): Use special-variable-p to filter completions.
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't expand `declare'
in defmacros.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
Handle `declare'.
* lisp/emacs-lisp/cl.el (pushnew): Silence unfixable warning.
* lisp/emacs-lisp/cl-macs.el (defstruct, define-compiler-macro):
Mark unused arg as unused.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Use memq.
* lisp/emacs-lisp/autoload.el (make-autoload): Don't assume the macro's
first sexp is a list.
(autoload-generate-file-autoloads): Improve error message.
* lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist
to understand the new byte-code arg format.
* lisp/vc/smerge-mode.el:
* lisp/vc/log-view.el:
* lisp/vc/log-edit.el:
* lisp/vc/cvs-status.el:
* lisp/uniquify.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/bibtex-style.el:
* lisp/reveal.el:
* lisp/newcomment.el:
* lisp/emacs-lisp/smie.el:
* lisp/abbrev.el: Use lexical-binding.
* src/eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
(Fdefvar): Remove redundant SYMBOLP check.
(Ffunctionp): Don't signal an error for undefined aliases.
* doc/lispref/variables.texi (Converting to Lexical Binding): New node.
2011-03-11 15:04:22 -05:00
Glenn Morris
5ceaac0c61 * lisp/vc/vc-hg.el (vc-hg-pull, vc-hg-merge-branch): Use vc-hg-program. 2011-03-10 00:32:27 -08:00
Glenn Morris
02da65ff3a Add `vc-git-program' option; suggested on emacs-devel.
* lisp/vc/vc-git.el (vc-git-program): New option.
(vc-git-branches, vc-git-pull, vc-git-merge-branch, vc-git-command)
(vc-git--call): Use it.
2011-03-10 00:26:41 -08:00
Glenn Morris
7e319d3cc3 vc.el fix for bug#6146.
* lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt.
Give an explicit error if failed to make writable.
2011-03-07 00:56:30 -08:00
Glenn Morris
619f4b625e * lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. 2011-03-07 00:39:43 -08:00
Stefan Monnier
0d6459dfb5 Merge from trunk 2011-03-06 16:22:16 -05:00
Antoine Levitt
7e27ce9cdb Replace many instances of read-file-name with read-directory-name.
* lisp/files.el (delete-directory, copy-directory, list-directory): Use
read-directory-name.

* lisp/find-file.el (ff-find-the-other-file):
* lisp/net/ange-ftp.el (ange-ftp-make-directory):
* lisp/printing.el (pr-interactive-dir):
* lisp/progmodes/ada-prj.el (ada-prj-load-directory):
* lisp/progmodes/ebnf2ps.el (ebnf-print-directory)
(ebnf-spool-directory, ebnf-eps-directory)
(ebnf-syntax-directory):
* lisp/shell.el (shell):
* lisp/speedbar.el (speedbar-create-directory):
* lisp/vc/emerge.el (emerge-merge-directories):
* lisp/vc/vc-dir.el (vc-dir):
* lisp/vc/vc.el (vc-create-tag, vc-retrieve-tag): Likewise.

* lisp/gnus.el (gnus-interactive): Use read-directory-name.

* lisp/gnus-uu.el (gnus-uu-decode-uu-and-save)
(gnus-uu-decode-unshar-and-save, gnus-uu-decode-save)
(gnus-uu-decode-binhex, gnus-uu-decode-yenc)
(gnus-uu-decode-save-view, gnus-uu-decode-postscript-and-save):
Likewise.

* lisp/mh-funcs.el (mh-store-msg, mh-store-buffer):
* lisp/mh-mime.el (mh-mime-save-parts): Use read-directory-name.

* lisp/dired.el: Clarify comment.
2011-03-05 16:56:00 -05:00
Glenn Morris
85a55d3871 * lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170) 2011-03-04 09:24:02 -08:00
Leo Liu
0a5cb52bb4 * lisp/vc/diff-mode.el (diff-mode): Fix whitespace-style. (Bug#8139) 2011-03-04 00:01:24 -08:00
David Abrahams
31128af6a3 ediff-init.el fix for bug#1821. (tiny change)
Tiny change; note that author said he placed it in the public domain.
(If this wasn't a tiny change, we would still need paperwork.)

* lisp/vc/ediff-init.el (ediff-use-faces, ediff-highlight-all-diffs):
Move ediff-defvar-local calls after defcustoms.
2011-03-03 00:19:34 -08:00
Glenn Morris
ce043df24a * lisp/vc/vc-rcs.el: Remove some ancient comments.
Anyone using rcs < 5.6.2 in 2011 probably has a functioning time
machine, so does not need hand-holding.
2011-03-02 23:52:10 -08:00
Bob Rogers
c7a748017a vc-dir fix for bug#7349.
* lisp/vc/vc-dir.el (vc-dir-mode-map):
Bind vc-dir-find-file to e, like in dired.
2011-03-02 23:33:35 -08:00
Vagn Johansen
614b85f89e vc-svn fix for bug#7663 on MS Windows. (tiny change)
* lisp/vc/vc-svn.el (vc-svn-after-dir-status): Some MS Windows svn client
programs output backslashes.
2011-03-02 23:27:52 -08:00
Glenn Morris
f96dc50fc0 vc-bzr fix for bug#8025.
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
Handle dirstate entries with no parents.
2011-03-02 22:25:21 -08:00
Stefan Monnier
a9de04fa62 Compute freevars in cconv-analyse.
* lisp/emacs-lisp/cconv.el: Compute freevars in cconv-analyse.
(cconv-mutated, cconv-captured): Remove.
(cconv-captured+mutated, cconv-lambda-candidates): Don't give them
a global value.
(cconv-freevars-alist): New var.
(cconv-freevars): Remove.
(cconv--lookup-let): Remove.
(cconv-closure-convert-function): Extract from cconv-closure-convert-rec.
(cconv-closure-convert-rec): Adjust to above changes.
(fboundp): New function.
(cconv-analyse-function, form): Rewrite.
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Handle declare-function here.
(byte-compile-obsolete): Remove.
(byte-compile-arglist-warn): Check late defsubst here.
(byte-compile-file-form): Simplify.
(byte-compile-file-form-defsubst): Remove.
(byte-compile-macroexpand-declare-function): Rename from
byte-compile-declare-function, turn it into a macro-expander.
(byte-compile-normal-call): Check obsolescence.
(byte-compile-quote-form): Remove.
(byte-compile-defmacro): Revert to trunk's definition which seems to
work just as well and handles `declare'.
* lisp/emacs-lisp/byte-run.el (make-obsolete): Don't modify byte-compile.
* lisp/Makefile.in (BIG_STACK_DEPTH): Increase to 1200.
(compile-onefile): Pass $(BIG_STACK_OPTS) before "-l bytecomp".
* lisp/emacs-lisp/macroexp.el: Use lexbind.
(macroexpand-all-1): Check macro obsolescence.
* lisp/vc/diff-mode.el: Use lexbind.
* lisp/follow.el (follow-calc-win-end): Simplify.
2011-02-26 10:19:08 -05:00
Chong Yidong
3ab713fdac Improvements to vc-bzr conffile handling and pull/merge support.
* vc/vc-bzr.el (vc-bzr--branch-conf): Function deleted.
(vc-bzr-branch-conf): New function, similar to vc-bzr--branch-conf
but returning an alist.  Ignore comments in bzr conffile.
(vc-bzr-pull, vc-bzr-merge-branch): Use vc-bzr-branch-conf.
(vc-bzr-error-regex-alist): New var.
(vc-bzr-merge-branch): Use it to highlight the pull/merge buffer.

* progmodes/compile.el (compilation--flush-directory-cache):
Handle the case where cdr of compilation--flush-directory-cache
points to no buffer, which can occur if we previously switched to
compilation-mode in a pregenerated buffer.

* vc/vc-dispatcher.el (vc-do-async-command): Bind
inhibit-read-only to t.
2011-02-19 16:23:51 -05:00
Glenn Morris
67ab0163d6 Merge from emacs-23; up to 2010-06-01T01:49:15Z!monnier@iro.umontreal.ca 2011-02-19 11:40:59 -08:00
Glenn Morris
92e39d6fbf vc.el fix for bug#4496.
* lisp/vc/vc.el (vc-default-previous-version):
Remove broken alias that points nowhere.
2011-02-16 20:57:22 -08:00
Chong Yidong
33f6cf7b4c Add Log View toggle and log format customization for Git and Hg.
* lisp/vc/vc-git.el (vc-git-root-log-format): New option for
customizing log format.
(vc-git-print-log, vc-git-log-outgoing, vc-git-log-incoming)
(vc-git-log-view-mode): Use it.
(vc-git-expanded-log-entry): New function.
(vc-git-log-view-mode): Use it.  Truncate lines in root log.

* lisp/vc/vc-hg.el (vc-hg-root-log-template): New option for
customizing log format.
(vc-hg-print-log): Use it.
(vc-hg-expanded-log-entry): New function.
(vc-hg-log-view-mode): Use vc-hg-root-log-template and
vc-hg-expanded-log-entry.  Truncate lines in root log.

* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): Truncate lines in root log.

* lisp/vc/log-view.el (log-view-mode-menu): Add
log-view-toggle-entry-display.
2011-02-13 20:49:24 -05:00
Chong Yidong
d4eb88c7ab Bind RET in Log View mode to a command that toggles a more detailed display.
* lisp/vc/log-view.el: New command log-view-toggle-entry-display for
toggling log entries between concise and detailed forms.
(log-view-toggle-entry-display): New command.
(log-view-mode-map): Bind RET to it.
(log-view-expanded-log-entry-function): New variable.
(log-view-current-entry, log-view-inside-comment-p)
(log-view-current-tag): New functions.
(log-view-toggle-mark-entry): Use log-view-current-entry and
log-view-end-of-defun instead of searching directly with
log-view-message-re.
(log-view-end-of-defun): Likewise.  Add optional ARG for
compatibility with end-of-defun.
(log-view-end-of-defun): Ignore comments and VC buttons.

* lisp/vc/vc-bzr.el (vc-bzr-expanded-log-entry): New function.
(vc-bzr-log-view-mode): Use log-view-expanded-log-entry-function.
2011-02-13 15:04:33 -05:00
Chong Yidong
75d4dcc9d2 Use simple buttons, instead of widget buttons, in vc-log.
* lisp/vc/vc.el (vc-print-log-setup-buttons): Instead of using the
widget library for buttons, just use button.el.

* lisp/vc/log-view.el (log-view-mode-map): Don't inherit from
widget-keymap.
2011-02-12 22:07:53 -05:00
Chong Yidong
84eb0351d8 Merge changes from emacs-23 branch 2011-02-12 18:40:43 -05:00
Karl Pflästerer
b5a5379544 Adapt to Subversion change, with no .svn directory in each sub directory.
http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00357.html

* vc/vc-svn.el (vc-svn-registered): Use vc-svn-root.
(vc-svn-root): New function.  Make vc-svn-responsible-p an alias.
(vc-svn-repository-hostname): Use "svn info".
2011-02-11 20:12:53 -05:00
Stefan Monnier
cf77dd27af * lisp/vc/vc-dir.el (vc-dir-refresh): Reorder operations to try and avoid
bzr locking race condition.
2011-02-10 14:37:42 -05:00
Glenn Morris
219ea611fd * lisp/vc/vc-hg.el (vc-hg-command): Doc fix. 2011-02-02 23:33:16 -08:00
Sam Steingold
abef340a0c * lisp/simple.el (special-mode-map): Bind "h" to `describe-mode';
bind "z" to `kill-this-buffer'.
(completion-list-mode-map): Bind "z" to `kill-this-buffer'.
* lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'.
(apropos-mode): Inherit from `special-mode'.
* lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'.
* lisp/bookmark.el (bookmark-bmenu-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'.
* lisp/image-mode.el (image-mode-map): Ditto.
* lisp/replace.el (occur-mode): Define using
`define-derived-mode' inheriting from `special-mode'.
* lisp/tar-mode.el (tar-mode): Inherit from `special-mode'.
* lisp/calendar/diary-lib.el (diary-fancy-display-mode):
Inherit from `special-mode-map'.
* lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode):
Inherit from `special-mode'.
* lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from
`special-mode-map'.
(package-menu-mode): Define using `define-derived-mode'
inheriting from `special-mode'.
* erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'.
* lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'.
(xesam-mode-map): Define separately.
* lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'.
* lisp/progmodes/compile.el (compilation-minor-mode-map)
(compilation-mode-map): Inherit from `special-mode-map'.
* lisp/vc/diff-mode.el (diff-mode-shared-map):
Inherit from `special-mode-map'.
* lisp/vc/log-view.el (log-view-mode-map): Add a comment.
2011-02-01 16:22:21 -05:00
Chong Yidong
a2b6e5d60b Refresh Dired and VC-dir buffers after vc-pull and vc-merge.
* vc/vc-dispatcher.el (vc-set-async-update): New function for
updating Dired or VC-dir buffers after async command completes.

* vc/vc-bzr.el (vc-bzr-async-command): Return the process buffer.
(vc-bzr-pull, vc-bzr-merge-branch): Use vc-set-async-update.

* vc/vc-git.el (vc-git-merge-branch): Add FETCH_HEAD to branch
completions if it exists.  Use vc-set-async-update.
(vc-git-pull): Use vc-set-async-update.

* vc/vc-hg.el (vc-hg-pull): Fix default-contents arg to
read-shell-command.  Use vc-set-async-update.
(vc-hg-merge-branch): Use vc-set-async-update.
2011-01-29 16:19:21 -05:00
Chong Yidong
659114fdba Rudimentary support for vc-pull and vc-merge in Git and Mercurial.
* lisp/vc/vc.el (vc-pull): Make vc-update an alias for this, instead of
the other way around.

* lisp/vc/vc-git.el (vc-git-branches, vc-git-pull)
(vc-git-merge-branch): New functions.
(vc-git-history): New var.

* lisp/vc/vc-hg.el (vc-hg-history): New var.
(vc-hg-pull): Perform default pull if called via Lisp by vc-pull.
(vc-hg-merge-branch): New function.
2011-01-28 22:12:32 -05:00
Chong Yidong
9bfe578343 Convert vc-bzr-async-command into a general vc-do-async-command facility.
* vc/vc-dispatcher.el (vc-do-async-command): New function.

* vc/vc-bzr.el (vc-bzr-async-command): Convert into a wrapper for
vc-do-async-command.

* vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Callers changed.
2011-01-28 18:10:55 -05:00
Deniz Dogan
27bbeb296e * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
there are some diff switches.
2011-01-27 18:51:06 +01:00
Glenn Morris
95df8112a0 Refill some long/short copyright headers. 2011-01-26 00:36:39 -08:00
Sam Steingold
ed68f651c0 * lisp/vc/vc-svn.el (vc-svn-diff): Use `diff-command' instead of the
literal "diff" (important for windows-nt).
2011-01-25 11:01:53 -05:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Chong Yidong
e7c1dca85c * vc/diff.el (diff-sentinel): Doc fix (Bug#7682). 2011-01-22 15:15:24 -05:00
Glenn Morris
dbfb414e49 * lisp/vc/vc-svn.el (vc-svn-after-dir-status): Tweak previous change. 2011-01-19 23:17:22 -08:00
Glenn Morris
5dd4f3f7c7 vc-svn fix for bug#7861.
* lisp/vc/vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status):
Also check the property status.
2011-01-18 19:49:00 -08:00
Glenn Morris
e9bffc61f2 Refill some copyright headers. 2011-01-15 18:21:30 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Glenn Morris
362b9d483c Merge from emacs-23 branch. 2011-01-15 12:03:38 -08:00