Commit 4a47c275 authored by Stefan Monnier's avatar Stefan Monnier

Merge from emacs-23

parents 8bbb7dd8 b916cbef
......@@ -2,6 +2,8 @@
(sentence-end-double-space . t)
(fill-column . 70)))
(c-mode . ((c-file-style . "GNU")))
;; You must set bugtracker_debbugs_url in your bazaar.conf for this to work.
;; See admin/notes/bugtracker.
(log-edit-mode . ((log-edit-rewrite-fixes
" (bug#\\([0-9]+\\))" . "debbugs:\\1")))
(change-log-mode . ((add-log-time-zone-rule . t)
......
......@@ -474,16 +474,41 @@ http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg00440.html
** Bazaar stuff
*** You can use `bzr commit --fixes emacs:123' to mark that a commit fixes
Emacs bug 123. You will first need to add a line to your bazaar.conf:
*** You can use `bzr commit --fixes debbugs:123' to mark that a commit fixes
Emacs bug 123. You will first need to add a line to your ~/bazaar.conf
or ~/locations.conf:
bugtracker_emacs_url = http://debbugs.gnu.org/{id}
bugtracker_debbugs_url = http://debbugs.gnu.org/{id}
Here "{id}" is a literal string, a placeholder that will be replaced
by the bug number you specify after `--fixes debbugs:' in the bzr
command line (123 in the example above).
In the bazaar.conf file, this setting should go into the [DEFAULTS]
section.
In the locations.conf file, it should go into the branch-specific
configuration section for the branch where you want this to be in
effect. For example, if you want this to be in effect for the branch
located at `/home/projects/emacs/trunk', you need to have this in your
~/locations.conf file:
[/home/projects/emacs/trunk]
bugtracker_debbugs_url = http://debbugs.gnu.org/{id}
If you want to use this in all Emacs branches whose common parent is
`/home/projects/emacs', put the setting in the [/home/projects/emacs]
section. See "bzr help configuration" for more information about
the *.conf files, their location and formats. See "bzr help bugs" for
more information about the bugtracker_debbugs_url setting.
See also log-edit-rewrite-fixes in .dir-locals.el.
Note that all this does is add some metadata to the commit, it doesn't
actually mark the bug as closed in the tracker. There seems to be no
way to see this "metadata" with `bzr log', which is rather poor, but
it will show up as a link in a recent loggerhead installation, or with
some of the graphical frontends to bzr log.
actually mark the bug as closed in the tracker. You can see this
information with `bzr log', and it will show up as a link in a recent
loggerhead installation, or with some of the graphical frontends to
`bzr log'.
** Gnus-specific voodoo
......
......@@ -9364,6 +9364,17 @@ $as_echo "no" >&6; }
$as_echo "#define HAVE_GCONF 1" >>confdefs.h
for ac_func in g_type_init
do :
ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
if test "x$ac_cv_func_g_type_init" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_G_TYPE_INIT 1
_ACEOF
fi
done
fi
fi
......
......@@ -1982,6 +1982,8 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no)
if test "$HAVE_GCONF" = yes; then
AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
dnl Newer GConf doesn't link with g_objects, so this is not defined.
AC_CHECK_FUNCS([g_type_init])
fi
fi
......
2010-11-17 Eli Zaretskii <eliz@gnu.org>
* customize.texi (Composite Types): Lower-case index entry.
* loading.texi (How Programs Do Loading): Document
load-file-name. (Bug#7346)
2010-11-17 Glenn Morris <rgm@gnu.org>
* text.texi (Kill Functions, Low-Level Kill Ring): Small fixes.
2010-11-13 Eli Zaretskii <eliz@gnu.org>
* display.texi (Usual Display): Characters with no fonts are not
......
......@@ -733,7 +733,7 @@ The value must be a valid color name, and you can do completion with
@node Composite Types
@subsection Composite Types
@cindex Composite Types (customization)
@cindex composite types (customization)
When none of the simple types is appropriate, you can use composite
types, which build new types from other types or from specified data.
......
......@@ -107,6 +107,10 @@ in @code{load-path}, where @code{nil} stands for the default directory.
@code{load-path}, then all three suffixes in the second directory, and
so on. @xref{Library Search}.
Whatever the name under which the file is eventually found, and the
directory where Emacs found it, Emacs sets the value of the variable
@code{load-file-name} to that file's name.
If you get a warning that @file{foo.elc} is older than @file{foo.el}, it
means you should consider recompiling @file{foo.el}. @xref{Byte
Compilation}.
......@@ -157,6 +161,12 @@ This variable is non-@code{nil} if Emacs is in the process of loading a
file, and it is @code{nil} otherwise.
@end defvar
@defvar load-file-name
When Emacs is in the process of loading a file, this variable's value
is the name of that file, as Emacs found it during the search
described earlier in this section.
@end defvar
@defvar load-read-function
@anchor{Definition of load-read-function}
@c do not allow page break at anchor; work around Texinfo deficiency.
......
......@@ -901,10 +901,10 @@ from the buffer. It returns @code{nil}.
The command does not set @code{this-command} to @code{kill-region}, so a
subsequent kill command does not append to the same kill ring entry.
Don't call @code{copy-region-as-kill} in Lisp programs unless you aim to
support Emacs 18. For newer Emacs versions, it is better to use
@code{kill-new} or @code{kill-append} instead. @xref{Low-Level Kill
Ring}.
@c FIXME Why is it better? Why isn't copy-region-as-kill obsolete then?
@c Why is it used in many places in Emacs?
In Lisp programs, it is better to use @code{kill-new} or
@code{kill-append} instead of this command. @xref{Low-Level Kill Ring}.
@end deffn
@node Yanking
......@@ -1042,8 +1042,8 @@ text property, if there is one.
@subsection Low-Level Kill Ring
These functions and variables provide access to the kill ring at a
lower level, but still convenient for use in Lisp programs, because they
take care of interaction with window system selections
lower level, but are still convenient for use in Lisp programs,
because they take care of interaction with window system selections
(@pxref{Window System Selections}).
@defun current-kill n &optional do-not-move
......@@ -4324,6 +4324,4 @@ code that is itself run from a modification hook, then rebind locally
@code{inhibit-modification-hooks} to @code{nil}.
@end defvar
@ignore
arch-tag: 3721e738-a1cb-4085-bc1a-6cb8d8e1d32b
@end ignore
......@@ -2,6 +2,14 @@
* gnus.texi (Misc Article): Document gnus-inhibit-images.
2010-11-17 Glenn Morris <rgm@gnu.org>
* edt.texi: Remove information about Emacs 19.
2010-11-17 Michael Albinus <michael.albinus@gmx.de>
* trampver.texi: Update release number.
2010-11-12 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus.texi (Article Washing): Fix typo.
......
......@@ -63,8 +63,8 @@ of DEC's EDT editor.
@node Overview
@chapter Overview of the EDT Package
This manual describes version 4.0 of the EDT Emulation for Emacs 19 and
above. It comes with special functions which replicate nearly all of
This manual describes version 4.0 of the EDT Emulation for Emacs.
It comes with special functions which replicate nearly all of
EDT's keypad mode behavior. It sets up default keypad and function key
bindings which closely match those found in EDT. Support is provided so
that users may reconfigure most keypad and function key bindings to
......@@ -152,9 +152,8 @@ You can also invoke @code{edt-set-scroll-margins} interactively while
EDT Emulation is active to change the settings for that session.
@strong{Please note:} Another way to set the scroll margins is to use
the Emacs customization feature (not available in Emacs 19) to set the
following two variables directly: @code{edt-top-scroll-margin} and
@code{edt-bottom-scroll-margin}.
the Emacs customization feature to set the following two variables
directly: @code{edt-top-scroll-margin} and @code{edt-bottom-scroll-margin}.
Enter the Emacs @code{customize} command. First select the
@samp{Editing} group and then select the @samp{Emulations} group.
......@@ -239,8 +238,7 @@ Provide an easy way to restore @strong{all} original Emacs key bindings,
just as they existed before the EDT emulation was first invoked.
@item
Support GNU Emacs 19 and higher. (GNU Emacs 18 and below is no longer
supported.) XEmacs 19, and above, is also supported.
Support GNU Emacs 19 and higher. XEmacs 19, and above, is also supported.
@item
Supports highlighting of marked text within the EDT emulation on all
......@@ -933,9 +931,8 @@ You can also invoke @code{edt-set-scroll-margins} interactively while
EDT Emulation is active to change the settings for that session.
@strong{Please note:} Another way to set the scroll margins is to use
the Emacs customization feature (not available in Emacs 19) to set the
following two variables directly: @code{edt-top-scroll-margin} and
@code{edt-bottom-scroll-margin}.
the Emacs customization feature to set the following two variables
directly: @code{edt-top-scroll-margin} and @code{edt-bottom-scroll-margin}.
Enter the Emacs @code{customize} command. First select the
@samp{Editing} group and then select the @samp{Emulations} group.
......@@ -946,7 +943,3 @@ Finally, select the @samp{Edt} group and follow the directions.
@include doclicense.texi
@bye
@ignore
arch-tag: 1b7ebe01-754b-4834-a12b-f152ef7db9e0
@end ignore
......@@ -48,6 +48,10 @@ indentation, which can be adjusted via ad-hoc indentation rules.
* Incompatible Lisp Changes in Emacs 23.3
** posn-col-row now excludes the header line from the row count
If the frame has a header line, posn-col-row will count row numbers
starting from the first line of text below the header line.
* Lisp changes in Emacs 23.3
......@@ -55,6 +59,7 @@ indentation, which can be adjusted via ad-hoc indentation rules.
The old names are obsolete.
** The use of unintern without an obarray arg is declared obsolete.
** The function `princ-list' is declared obsolete.
** The yank-handler argument to kill-region and friends is declared obsolete.
** New function byte-to-string, like char-to-string but for bytes.
......
2010-11-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* emacsclient.c (set_local_socket) [DARWIN_OS]: Add fall-back
definition of _CS_DARWIN_USER_TEMP_DIR for Mac OS X 10.4 and older.
2010-11-15 Dan Nicolaescu <dann@ics.uci.edu>
* test-distrib.c: Remove include guards for config.h and fcntl.h.
......
......@@ -1225,6 +1225,9 @@ set_local_socket (void)
if (!tmpdir)
{
#ifdef DARWIN_OS
#ifndef _CS_DARWIN_USER_TEMP_DIR
#define _CS_DARWIN_USER_TEMP_DIR 65537
#endif
size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0);
if (n > 0)
{
......
2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (kill-new, kill-append, kill-region):
* comint.el (comint-kill-region): Make the yank-handler argument obsolete.
2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
* 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.
* vc-hg.el (vc-hg-program): New var.
Suggested by Norman Gray <norman@astro.gla.ac.uk>.
(vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.
2010-11-18 Glenn Morris <rgm@gnu.org>
* emacs-lisp/autoload.el (autoload-find-destination): The function
coding-system-eol-type may return non-numeric values. (Bug#7414)
2010-11-18 Ulrich Mueller <ulm@gentoo.org>
* server.el (server-force-stop): Ensure the server is stopped (Bug#7409).
2010-11-18 Eli Zaretskii <eliz@gnu.org>
* subr.el (posn-col-row): Pay attention to header line. (Bug#7390)
2010-11-18 Chong Yidong <cyd@stupidchicken.com>
* textmodes/picture.el (picture-mouse-set-point): Don't use
posn-col-row; explicitly compute the motion based on the posn at
the window-start (Bug#7390).
2010-11-18 Glenn Morris <rgm@gnu.org>
* novice.el (disabled-command-function):
Fix 2009-11-15 change. (Bug#7384)
2010-11-18 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (diary-iso-date-forms): Make elements
mutually exclusive. (Bug#7377)
2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/smie.el (smie-prec2->grammar): Obey equality constraints
when filling the remaining "unconstrained" values.
2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
safety predicate.
* files.el (safe-local-variable-p): Gracefully handle errors.
* 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-18 Glenn Morris <rgm@gnu.org>
* ls-lisp.el (ls-lisp-dired-ignore-case): Make it an obsolete alias.
2010-11-18 Glenn Morris <rgm@gnu.org>
* printing.el (pr-menu-bind): Doc fix.
* speedbar.el (speedbar-toggle-images): Doc fix.
* progmodes/python.el (python-shell): Doc fix.
* wid-edit.el (widget-field-use-before-change)
(widget-use-overlay-change): Doc fixes.
2010-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
Minor cleanup to improve style.
......
......@@ -736,14 +736,16 @@ calendar package is already loaded). Rather, use either
(defcustom diary-iso-date-forms
'((month "[-/]" day "[^-/0-9]")
(year "[-/]" month "[-/]" day "[^0-9]")
(monthname "-" day "[^-0-9]")
(year "-" monthname "-" day "[^0-9]")
;; Cannot allow [-/] as separators here, since it would also match
;; the first element (bug#7377).
(monthname " *" day "[^-0-9]")
(year " *" monthname " *" day "[^0-9]")
(dayname "\\W"))
"List of pseudo-patterns describing the ISO style of dates.
The defaults are: MONTH[-/]DAY; YEAR[-/]MONTH[-/]DAY; MONTHNAME-DAY;
YEAR-MONTHNAME-DAY; DAYNAME. Normally you should not customize this,
The defaults are: MONTH[-/]DAY; YEAR[-/]MONTH[-/]DAY; MONTHNAME DAY;
YEAR MONTHNAME DAY; DAYNAME. Normally you should not customize this,
but `diary-date-forms' (which see)."
:version "23.1"
:version "23.3" ; bug#7377
:type '(repeat (choice (cons :tag "Backup"
:value (backup . nil)
(const backup)
......@@ -2570,5 +2572,4 @@ If called by a mouse-event, pops up a menu with the result."
;; byte-compile-dynamic: t
;; End:
;; arch-tag: 19c61596-c8fb-4c69-bcf1-7dd739919cd8
;;; calendar.el ends here
......@@ -2648,6 +2648,7 @@ updated using `comint-update-fence', if necessary."
(let ((inhibit-read-only t))
(kill-region beg end yank-handler)
(comint-update-fence))))))
(set-advertised-calling-convention 'comint-kill-region '(beg end) "23.3")
;; Support for source-file processing commands.
......
......@@ -575,8 +575,8 @@ removes any prior now out-of-date autoload entries."
(autoload-ensure-default-file (autoload-generated-file)))
;; This is to make generated-autoload-file have Unix EOLs, so
;; that it is portable to all platforms.
(unless (zerop (coding-system-eol-type buffer-file-coding-system))
(set-buffer-file-coding-system 'unix))
(or (eq 0 (coding-system-eol-type buffer-file-coding-system))
(set-buffer-file-coding-system 'unix))
(or (> (buffer-size) 0)
(error "Autoloads file %s lacks boilerplate" buffer-file-name))
(or (file-writable-p buffer-file-name)
......
......@@ -301,21 +301,12 @@ suppress. For example, (not mapcar) will suppress warnings about mapcar."
(set :menu-tag "Some"
,@(mapcar (lambda (x) `(const ,x))
byte-compile-warning-types))))
;;;###autoload(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p)
;;;###autoload
(defun byte-compile-warnings-safe-p (x)
"Return non-nil if X is valid as a value of `byte-compile-warnings'."
(or (booleanp x)
(and (listp x)
(if (eq (car x) 'not) (setq x (cdr x))
t)
(equal (mapcar
(lambda (e)
(when (memq e byte-compile-warning-types)
e))
x)
x))))
(put 'byte-compile-warnings 'safe-local-variable
(lambda (v)
(or (symbolp v)
(null (delq nil (mapcar (lambda (x) (not (symbolp x))) v))))))
(defun byte-compile-warning-enabled-p (warning)
"Return non-nil if WARNING is enabled, according to `byte-compile-warnings'."
......
This diff is collapsed.
......@@ -3224,7 +3224,10 @@ It is safe if any of these conditions are met:
evaluates to a non-nil value with VAL as an argument."
(or (member (cons sym val) safe-local-variable-values)
(let ((safep (get sym 'safe-local-variable)))
(and (functionp safep) (funcall safep val)))))
(and (functionp safep)
;; If the function signals an error, that means it
;; can't assure us that the value is safe.
(with-demoted-errors (funcall safep val))))))
(defun risky-local-variable-p (sym &optional ignored)
"Non-nil if SYM could be dangerous as a file-local variable.
......
......@@ -103,10 +103,16 @@ update the dependent variables."
(ls-lisp-set-options)))
:group 'ls-lisp)
;; Only made an obsolete alias in 23.3. Before that, the initial
;; value was set according to:
;; (or (memq ls-lisp-emulation '(MS-Windows MacOS))
;; (and (boundp 'ls-lisp-dired-ignore-case) ls-lisp-dired-ignore-case))
;; Which isn't the right thing to do.
(define-obsolete-variable-alias 'ls-lisp-dired-ignore-case
'ls-lisp-ignore-case "21.1")
(defcustom ls-lisp-ignore-case
;; Name change for consistency with other option names.
(or (memq ls-lisp-emulation '(MS-Windows MacOS))
(and (boundp 'ls-lisp-dired-ignore-case) ls-lisp-dired-ignore-case))
(memq ls-lisp-emulation '(MS-Windows MacOS))
"Non-nil causes ls-lisp alphabetic sorting to ignore case."
:set-after '(ls-lisp-emulation)
:type 'boolean
......
;;; mouse-sel.el --- multi-click selection support for Emacs 19
;;; mouse-sel.el --- multi-click selection support
;; Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
......
;;; novice.el --- handling of disabled commands ("novice mode") for Emacs
;; Copyright (C) 1985, 1986, 1987, 1994, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Copyright (C) 1985, 1986, 1987, 1994, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal, help
......@@ -110,9 +110,9 @@ SPC to try the command just this once, but leave it disabled.
(not (string= "" user-init-file))
(y-or-n-p "Enable command for future editing sessions also? "))
(enable-command cmd)
(put cmd 'disabled nil)))
(?n nil)
(t (call-interactively cmd)))))
(put cmd 'disabled nil))))
(or (char-equal char ?n)
(call-interactively cmd))))
(defun en/disable-command (command disable)
(unless (commandp command)
......@@ -169,5 +169,4 @@ to future sessions."
(provide 'novice)
;; arch-tag: f83c0f96-497e-4db6-a430-8703716c6dd9
;;; novice.el ends here
......@@ -3438,12 +3438,7 @@ See `pr-ps-printer-alist'.")
(defun pr-menu-bind ()
"Install `printing' menu in the menubar.
On Emacs 20, it replaces the Tools/Print menu by Tools/Printing menu.
On Emacs 21 and 22, it replaces the File/Print* menu entries by File/Print
menu.
This replaces the File/Print* menu entries with a File/Print sub-menu.
Calls `pr-update-menus' to adjust menus."
(interactive)
(pr-global-menubar pr-menu-spec)
......@@ -6670,5 +6665,4 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
(provide 'printing)
;; arch-tag: 9ce9ac3f-0f60-4370-900b-1943215d9d18
;;; printing.el ends here
......@@ -2807,7 +2807,7 @@ command is used to switch to an existing process, only when a new
process is started. If you use this, you will probably want to ensure
that the current arguments are retained (they will be included in the
prompt). This argument is ignored when this function is called
programmatically, or when running in Emacs 19.34 or older.
programmatically.
Note: You can toggle between using the CPython interpreter and the
JPython interpreter by hitting \\[python-toggle-shells]. This toggles
......
......@@ -609,7 +609,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
(defun server-force-stop ()
"Kill all connections to the current server.
This function is meant to be called from `kill-emacs-hook'."
(server-start nil t))
(server-start t t))
;;;###autoload
(defun server-force-delete (&optional name)
......
......@@ -2990,11 +2990,6 @@ If `interprogram-cut-function' is non-nil, apply it to STRING.
Optional second argument REPLACE non-nil means that STRING will replace
the front of the kill ring, rather than being added to the list.
Optional third arguments YANK-HANDLER controls how the STRING is later
inserted into a buffer; see `insert-for-yank' for details.
When a yank handler is specified, STRING must be non-empty (the yank
handler, if non-nil, is stored as a `yank-handler' text property on STRING).
When `save-interprogram-paste-before-kill' and `interprogram-paste-function'
are non-nil, saves the interprogram paste string(s) into `kill-ring' before
STRING.
......@@ -3034,22 +3029,19 @@ argument should still be a \"useful\" string for such uses."
(setq kill-ring-yank-pointer kill-ring)
(if interprogram-cut-function
(funcall interprogram-cut-function string)))
(set-advertised-calling-convention
'kill-new '(string &optional replace) "23.3")
(defun kill-append (string before-p &optional yank-handler)
"Append STRING to the end of the latest kill in the kill ring.
If BEFORE-P is non-nil, prepend STRING to the kill.
Optional third argument YANK-HANDLER, if non-nil, specifies the
yank-handler text property to be set on the combined kill ring
string. If the specified yank-handler arg differs from the
yank-handler property of the latest kill string, this function
adds the combined string to the kill ring as a new element,
instead of replacing the last kill with it.
If `interprogram-cut-function' is set, pass the resulting kill to it."
(let* ((cur (car kill-ring)))
(kill-new (if before-p (concat string cur) (concat cur string))
(or (= (length cur) 0)
(equal yank-handler (get-text-property 0 'yank-handler cur)))
yank-handler)))
(set-advertised-calling-convention 'kill-append '(string before-p) "23.3")
(defcustom yank-pop-change-selection nil
"If non-nil, rotating the kill ring changes the window system selection."
......@@ -3130,11 +3122,7 @@ Supply two arguments, character positions indicating the stretch of text
Any command that calls this function is a \"kill command\".
If the previous command was also a kill command,
the text killed this time appends to the text killed last time
to make one entry in the kill ring.
In Lisp code, optional third arg YANK-HANDLER, if non-nil,
specifies the yank-handler text property to be set on the killed
text. See `insert-for-yank'."
to make one entry in the kill ring."
;; Pass point first, then mark, because the order matters
;; when calling kill-append.
(interactive (list (point) (mark)))
......@@ -3166,6 +3154,7 @@ text. See `insert-for-yank'."
(barf-if-buffer-read-only)
;; If the buffer isn't read-only, the text is.
(signal 'text-read-only (list (current-buffer)))))))
(set-advertised-calling-convention 'kill-region '(beg end) "23.3")
;; copy-region-as-kill no longer sets this-command, because it's confusing
;; to get two copies of the text when the user accidentally types M-w and
......
......@@ -1692,8 +1692,7 @@ variable `speedbar-obj-alist'."
(speedbar-enable-update)))
(defun speedbar-toggle-images ()
"Toggle use of images in the speedbar frame.
Images are not available in Emacs 20 or earlier."
"Toggle use of images in the speedbar frame."
(interactive)
(setq speedbar-use-images (not speedbar-use-images))
(speedbar-refresh))
......
......@@ -954,7 +954,8 @@ and `event-end' functions."
((null spacing)
(setq spacing 0)))
(cons (/ (car pair) (frame-char-width frame))
(/ (cdr pair) (+ (frame-char-height frame) spacing))))))))
(- (/ (cdr pair) (+ (frame-char-height frame) spacing))
(if (null header-line-format) 0 1))))))))
(defun posn-actual-col-row (position)
"Return the actual column and row in POSITION, measured in characters.
......
......@@ -226,16 +226,30 @@ Do \\[command-apropos] picture-movement to see commands which control motion."
(picture-motion (- arg)))
(defun picture-mouse-set-point (event)
"Move point to the position clicked on, making whitespace if necessary."
"Move point to the position of EVENT, making whitespace if necessary."
(interactive "e")
(let* ((pos (posn-col-row (event-start event)))
(x (car pos))
(y (cdr pos))
(current-row (count-lines (window-start) (line-beginning-position))))
(unless (equal x (current-column))
(picture-forward-column (- x (current-column))))
(unless (equal y current-row)
(picture-move-down (- y current-row)))))
(let ((position (event-start event)))
(unless (posn-area position) ; Ignore EVENT unless in text area
(let* ((window (posn-window position))
(frame (if (framep window) window (window-frame window)))
(pair (posn-x-y position))
(start-pos (window-start window))
(start-pair (posn-x-y (posn-at-point start-pos)))
(dx (- (car pair) (car start-pair)))
(dy (- (cdr pair) (cdr start-pair)))
(char-ht (frame-char-height frame))
(spacing (when (display-graphic-p frame)
(or (with-current-buffer (window-buffer window)
line-spacing)
(frame-parameter frame 'line-spacing))))
rows cols)
(cond ((floatp spacing)
(setq spacing (truncate (* spacing char-ht))))
((null spacing)
(setq spacing 0)))
(goto-char start-pos)
(picture-move-down (/ dy (+ char-ht spacing)))
(picture-forward-column (/ dx (frame-char-width frame)))))))
;; Picture insertion and deletion.
......
......@@ -134,6 +134,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
:version "23.1"
:group 'vc)
(defcustom vc-hg-program "hg"
"Name of the Mercurial executable (excluding any arguments)."
:type 'string
:group 'vc)
;;; Properties of the backend
......@@ -174,7 +178,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(append (list "TERM=dumb" "LANGUAGE=C")
process-environment)))
(process-file
"hg" nil t nil
vc-hg-program nil t nil
"--config" "alias.status=status"
"--config" "defaults.status="
"status" "-A" (file-relative-name file)))
......@@ -212,7 +216,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(let ((process-environment avoid-local-env))
;; Ignore all errors.
(process-file
"hg" nil t nil
vc-hg-program nil t nil
"--config" "alias.parents=parents"
"--config" "defaults.parents="
"parents" "--template" "{rev}" (file-relative-name file)))
......@@ -227,7 +231,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(condition-case nil
(let ((process-environment avoid-local-env))
(process-file
"hg" nil nil nil
vc-hg-program nil nil nil
;; We use "log" here, if there's a faster command
;; that returns true for an 'added file and false
;; for an 'unregistered one, we could use that.
......@@ -620,7 +624,7 @@ REV is the revision to check out into WORKFILE."
"A wrapper around `vc-do-command' for use in vc-hg.el.
The difference to vc-do-command is that this function always invokes `hg',
and that it passes `vc-hg-global-switches' to it before FLAGS."
(apply 'vc-do-command (or buffer "*vc*") okstatus "hg" file-or-list
(apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list
(if (stringp vc-hg-global-switches)
(cons vc-hg-global-switches flags)
(append vc-hg-global-switches
......
......@@ -316,9 +316,8 @@ size field.")
(defvar widget-field-use-before-change t
"Non-nil means use `before-change-functions' to track editable fields.
This enables the use of undo, but doesn't work on Emacs 19.34 and earlier.
Using before hooks also means that the :notify function can't know the
new value.")
This enables the use of undo. Using before hooks also means that
the :notify function can't know the new value.")
(defun widget-specify-field (widget from to)
"Specify editable button for WIDGET between FROM and TO."
......@@ -1053,7 +1052,7 @@ POS defaults to the value of (point)."
(defvar widget-use-overlay-change t
"If non-nil, use overlay change functions to tab around in the buffer.
This is much faster, but doesn't work reliably on Emacs 19.34.")
This is much faster.")
(defun widget-move (arg)
"Move point to the ARG next field or button.
......@@ -3782,5 +3781,4 @@ example:
(provide 'wid-edit)
;; arch-tag: a076e75e-18a1-4b46-8be5-3f317bcbc707
;;; wid-edit.el ends here
......@@ -105,9 +105,9 @@
since v1.3.3, include the MinGW headers and libraries as an integral
part).