From 1d16d0504bc8dd49062ef7c451c7d4f68456b779 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sun, 15 Jul 2007 08:31:26 +0000 Subject: (mouse-drag-track): Reset transient-mark-mode to nil when handling the terminating event. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0faca7d41bd..a18a61fe29b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-15 Martin Rudalics + + * mouse.el (mouse-drag-track): Reset transient-mark-mode to nil + when handling the terminating event. + 2007-07-15 Jeff Miller (tiny change) * calendar/cal-bahai.el (calendar-goto-bahai-date): Add autoload diff --git a/lisp/mouse.el b/lisp/mouse.el index 27b32e9f6f6..5577b94d01a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1013,6 +1013,11 @@ should only be used by mouse-drag-region." (overlay-start mouse-drag-overlay)) region-termination)) last-command this-command) + (when (eq transient-mark-mode 'identity) + ;; Reset `transient-mark-mode' to avoid expanding the region + ;; while scrolling (compare thread on "Erroneous selection + ;; extension ..." on bug-gnu-emacs from 2007-06-10). + (setq transient-mark-mode nil)) (push-mark region-commencement t t) (goto-char region-termination) (if (not do-mouse-drag-region-post-process) -- cgit v1.2.1 From f09bbd9388cd0e5577f489edcf8701627bf339cb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 14:36:26 +0000 Subject: (tar-get-descriptor): No error for zero-length file. --- lisp/ChangeLog | 4 ++++ lisp/tar-mode.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a18a61fe29b..938cbdb9a00 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-15 Aaron Hawley + + * tar-mode.el (tar-get-descriptor): No error for zero-length file. + 2007-07-15 Martin Rudalics * mouse.el (mouse-drag-track): Reset transient-mark-mode to nil diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index f222c23fbf0..684396f1692 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -667,7 +667,7 @@ appear on disk when you save the tar-file's buffer." ((eq link-p 38) "a volume header") ((eq link-p 55) "an extended pax header") (t "a link")))) - (if (zerop size) (error "This is a zero-length file")) + (if (zerop size) (message "This is a zero-length file")) descriptor)) (defun tar-mouse-extract (event) -- cgit v1.2.1 From 98738cd927eb3769566816595d5c644be9ca69bd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 15:26:33 +0000 Subject: (ps-default-bg): Change to White. --- lisp/ChangeLog | 4 ++++ lisp/ps-print.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 938cbdb9a00..2a89382a5cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-15 Richard Stallman + + * ps-print.el (ps-default-bg): Change to White. + 2007-07-15 Aaron Hawley * tar-mode.el (tar-get-descriptor): No error for zero-length file. diff --git a/lisp/ps-print.el b/lisp/ps-print.el index ea86d15e557..9db03217e5f 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3030,7 +3030,7 @@ It's used only when `ps-print-color-p' is non-nil." :version "20" :group 'ps-print-color) -(defcustom ps-default-bg 'frame-parameter +(defcustom ps-default-bg "white" "*RGB values of the default background color. The `ps-default-bg' variable contains the default background color used by -- cgit v1.2.1 From 0a2ea418fcf2061ad0cc0e88e98f1cbf9363278a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 17:56:23 +0000 Subject: (isearch-mode, isearch-done): Delete unintended code in previous change. --- lisp/ChangeLog | 3 +++ lisp/isearch.el | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a89382a5cd..6fd0a3b3e44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-07-15 Richard Stallman + * isearch.el (isearch-mode, isearch-done): + Delete unintended code in previous change. + * ps-print.el (ps-default-bg): Change to White. 2007-07-15 Aaron Hawley diff --git a/lisp/isearch.el b/lisp/isearch.el index 1804233847f..71e5e4bccd3 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -674,8 +674,6 @@ is treated as a regexp. See \\[isearch-forward] for more info." (make-local-variable 'input-method-function)) (setq input-method-function nil) - (setq cursor-in-echo-area t) - (looking-at "") (setq isearch-window-configuration (if isearch-slow-terminal-mode (current-window-configuration) nil)) @@ -800,8 +798,6 @@ NOPUSH is t and EDIT is t." (setq input-method-function isearch-input-method-function) (kill-local-variable 'input-method-function)) - (setq cursor-in-echo-area nil) - (force-mode-line-update) ;; If we ended in the middle of some intangible text, -- cgit v1.2.1 From f9b9868496ff25dabafcd3c35b6bb5600dbdd2fd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 18:16:21 +0000 Subject: (add-change-log-entry): Check add-log-full-name and add-log-mailing-address later, after change-log-mode-hook. --- lisp/ChangeLog | 5 +++++ lisp/add-log.el | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fd0a3b3e44..fc755882a6b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-15 Roland McGrath + + * add-log.el (add-change-log-entry): Check add-log-full-name + and add-log-mailing-address later, after change-log-mode-hook. + 2007-07-15 Richard Stallman * isearch.el (isearch-mode, isearch-done): diff --git a/lisp/add-log.el b/lisp/add-log.el index 08ce78d371d..09368d08f9e 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -509,19 +509,19 @@ non-nil, otherwise in local time." (file-name (expand-file-name (find-change-log file-name buffer-file))) ;; Set ITEM to the file name to use in the new item. (item (add-log-file-name buffer-file file-name)) - bound - (full-name (or add-log-full-name (user-full-name))) - (mailing-address (or add-log-mailing-address user-mail-address))) + bound full-name mailing-address) (if whoami (progn - (setq full-name (read-string "Full name: " full-name)) + (setq full-name (read-string "Full name: " + (or add-log-full-name (user-full-name)))) ;; Note that some sites have room and phone number fields in ;; full name which look silly when inserted. Rather than do ;; anything about that here, let user give prefix argument so that ;; s/he can edit the full name field in prompter if s/he wants. (setq mailing-address - (read-string "Mailing address: " mailing-address)))) + (read-string "Mailing address: " + (or add-log-mailing-address user-mail-address))))) (unless (equal file-name buffer-file-name) (if (or other-window (window-dedicated-p (selected-window))) @@ -532,6 +532,11 @@ non-nil, otherwise in local time." (undo-boundary) (goto-char (point-min)) + (or full-name + (setq full-name (or add-log-full-name (user-full-name)))) + (or mailing-address + (setq mailing-address (or add-log-mailing-address user-mail-address))) + ;; If file starts with a copyright and permission notice, skip them. ;; Assume they end at first blank line. (when (looking-at "Copyright") -- cgit v1.2.1 From 0e01e4afb99f8d278de0fea3270649e7ab46d652 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 18:40:19 +0000 Subject: (tutorial--find-changed-keys): Handle C-x specially like ESC. --- lisp/ChangeLog | 5 +++++ lisp/tutorial.el | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc755882a6b..322c00b6660 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-15 Richard Stallman + + * tutorial.el (tutorial--find-changed-keys): + Handle C-x specially like ESC. + 2007-07-15 Roland McGrath * add-log.el (add-change-log-entry): Check add-log-full-name diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 4856d178056..feaabbbb19e 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -431,10 +431,16 @@ where (def-fun (nth 0 kdf)) (def-fun-txt (format "%s" def-fun)) (rem-fun (command-remapping def-fun)) + ;; Handle prefix definitions specially + ;; so that a mode that rebinds some subcommands + ;; won't make it appear that the whole prefix is gone. (key-fun (if (eq def-fun 'ESC-prefix) (lookup-key global-map [27]) - (key-binding key))) + (if (eq def-fun 'Control-X-prefix) + (lookup-key global-map [24]) + (key-binding key)))) (where (where-is-internal (if rem-fun rem-fun def-fun)))) + (if where (progn (setq where (key-description (car where))) -- cgit v1.2.1 From be3eb6a6229303ee2d95ffe3942f07a46fb925a3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 18:45:59 +0000 Subject: (kmacro-bind-to-key): Avoid comparisons on function keys. --- lisp/ChangeLog | 2 ++ lisp/kmacro.el | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 322c00b6660..3631cccab7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2007-07-15 Richard Stallman + * kmacro.el (kmacro-bind-to-key): Avoid comparisons on function keys. + * tutorial.el (tutorial--find-changed-keys): Handle C-x specially like ESC. diff --git a/lisp/kmacro.el b/lisp/kmacro.el index bfc0edba2c1..4dc06a4ada3 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -795,8 +795,9 @@ may be shaded by a local key binding." ok cmd) (when (= (length key-seq) 1) (let ((ch (aref key-seq 0))) - (if (or (and (>= ch ?0) (<= ch ?9)) - (and (>= ch ?A) (<= ch ?Z))) + (if (and (integerp ch) + (or (and (>= ch ?0) (<= ch ?9)) + (and (>= ch ?A) (<= ch ?Z)))) (setq key-seq (concat "\C-x\C-k" key-seq) ok t)))) (when (and (not (equal key-seq "")) -- cgit v1.2.1 From 70e9f39931c1bc15846b9d0994ba4a69fc6f4a65 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 18:57:10 +0000 Subject: (Fsetq_default): Doc fix. --- src/data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data.c b/src/data.c index 471df20cd48..0b3be2fc694 100644 --- a/src/data.c +++ b/src/data.c @@ -1440,7 +1440,7 @@ More generally, you can use multiple variables and values, as in This sets each VAR's default value to the corresponding VALUE. The VALUE for the Nth VAR can refer to the new default values of previous VARs. -usage: (setq-default [VAR VALUE...]) */) +usage: (setq-default [VAR VALUE]...) */) (args) Lisp_Object args; { @@ -2349,7 +2349,9 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, return Qnil; } -/* Convert between long values and pairs of Lisp integers. */ +/* Convert between long values and pairs of Lisp integers. + Note that long_to_cons returns a single Lisp integer + when the value fits in one. */ Lisp_Object long_to_cons (i) -- cgit v1.2.1 From ec07b64b8eef75156015cbea689919c005bfbc37 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 15 Jul 2007 18:58:25 +0000 Subject: (Fsetq): Doc fix. --- src/ChangeLog | 6 ++++++ src/eval.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e507754c0ba..2a68c99d328 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-07-15 Richard Stallman + + * data.c (Fsetq_default): Doc fix. + + * eval.c (Fsetq): Doc fix. + 2007-07-11 Jason Rumney * makefile.w32-in (LIBS): Include OLE32. diff --git a/src/eval.c b/src/eval.c index 6707849a840..4ce5c6d05a9 100644 --- a/src/eval.c +++ b/src/eval.c @@ -97,6 +97,7 @@ Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; Lisp_Object Qand_rest, Qand_optional; Lisp_Object Qdebug_on_error; Lisp_Object Qdeclare; +Lisp_Object Qdebug; /* This holds either the symbol `run-hooks' or nil. It is nil at an early stage of startup, and when Emacs @@ -530,7 +531,7 @@ Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'. The second VAL is not computed until after the first SYM is set, and so on; each VAL can use the new value of variables set earlier in the `setq'. The return value of the `setq' form is the value of the last VAL. -usage: (setq SYM VAL SYM VAL ...) */) +usage: (setq [SYM VAL]...) */) (args) Lisp_Object args; { @@ -3600,6 +3601,9 @@ before making `inhibit-quit' nil. */); Qand_optional = intern ("&optional"); staticpro (&Qand_optional); + Qdebug = intern ("debug"); + staticpro (&Qdebug); + DEFVAR_LISP ("stack-trace-on-error", &Vstack_trace_on_error, doc: /* *Non-nil means errors display a backtrace buffer. More precisely, this happens for any error that is handled -- cgit v1.2.1 From 9513cf1003714a81764061bdafa1edaf5ffbe625 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 15 Jul 2007 19:15:02 +0000 Subject: Move autoload from previous change to calendar.el. --- lisp/ChangeLog | 3 +-- lisp/calendar/cal-bahai.el | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3631cccab7f..1711a9862b4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -28,8 +28,7 @@ 2007-07-15 Jeff Miller (tiny change) - * calendar/cal-bahai.el (calendar-goto-bahai-date): Add autoload - cookie. + * calendar/calendar.el (calendar-goto-bahai-date): Autoload it. 2007-07-13 Eli Zaretskii diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 7bf90ec5d11..06703e3b73b 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -149,7 +149,6 @@ Defaults to today's date if DATE is not given." (message "Baha'i date: %s" (calendar-bahai-date-string (calendar-cursor-to-date t)))) -;;;###autoload (defun calendar-goto-bahai-date (date &optional noecho) "Move cursor to Baha'i date DATE. Echo Baha'i date unless NOECHO is t." -- cgit v1.2.1 From fae7f7ebd85c0c7d72c34b07c8deaee3cdd0d6c6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 15 Jul 2007 19:16:34 +0000 Subject: Jeff Miller (tiny change) (calendar-goto-bahai-date): Autoload it. --- lisp/calendar/calendar.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 03f9a95fe37..83ec95c844c 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1821,6 +1821,11 @@ Driven by the variable `calendar-date-display-form'.") (autoload 'calendar-islamic-date-string "cal-islam" "String of Islamic date of Gregorian date.") +(autoload 'calendar-goto-bahai-date "cal-bahai" + "Move cursor to Baha'i date DATE. +Echo Baha'i date unless NOECHO is t." + t) + (autoload 'calendar-print-bahai-date "cal-bahai" "Show the Baha'i date equivalents of date." t) -- cgit v1.2.1 From f6be091c471ba7a0c4b4f3e8ce851f96daae7bbe Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 16 Jul 2007 03:50:51 +0000 Subject: (Defining Faces): Fix previous change. --- lispref/ChangeLog | 4 ++++ lispref/display.texi | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 0bd727f0748..61ee06011e6 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2007-07-16 Richard Stallman + + * display.texi (Defining Faces): Fix previous change. + 2007-07-10 Richard Stallman * display.texi (Defining Faces): Explain C-M-x feature for defface. diff --git a/lispref/display.texi b/lispref/display.texi index 8cf25110308..cd46a0e72ba 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1760,10 +1760,10 @@ When @code{defface} executes, it defines the face according to @var{spec}, then uses any customizations that were read from the init file (@pxref{Init File}) to override that specification. -When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs +When you evaluate a @code{defface} form with @kbd{C-M-x} in Emacs Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun} overrides any customizations of the face. This way, the face reflects -exactly what the @code{defcustom} says. +exactly what the @code{defface} says. The purpose of @var{spec} is to specify how the face should appear on different kinds of terminals. It should be an alist whose elements -- cgit v1.2.1 From 908265fc31cd7ed89c0170ed7b427e549847ce75 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 16 Jul 2007 03:58:54 +0000 Subject: (vc-hg-state): Handle removed files. (vc-hg-dir-state, vc-hg-dired-state-info): New functions. (vc-hg-checkout): Re-enable. --- lisp/ChangeLog | 6 +++++ lisp/vc-hg.el | 72 +++++++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1711a9862b4..1fc3057761c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-07-16 Dan Nicolaescu + + * vc-hg.el (vc-hg-state): Handle removed files. + (vc-hg-dir-state, vc-hg-dired-state-info): New functions. + (vc-hg-checkout): Re-enable. + 2007-07-15 Richard Stallman * kmacro.el (kmacro-bind-to-key): Avoid comparisons on function keys. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 31391f2d2c8..70488009232 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -42,13 +42,13 @@ ;; * registered (file) OK ;; * state (file) OK ;; - state-heuristic (file) ?? PROBABLY NOT NEEDED -;; - dir-state (dir) NEEDED +;; - dir-state (dir) OK ;; * workfile-version (file) OK ;; - latest-on-branch-p (file) ?? ;; * checkout-model (file) OK ;; - workfile-unchanged-p (file) ?? ;; - mode-line-string (file) NOT NEEDED -;; - dired-state-info (file) NEEDED +;; - dired-state-info (file) OK ;; STATE-CHANGING FUNCTIONS ;; * register (file &optional rev comment) OK ;; - init-version () NOT NEEDED @@ -58,7 +58,7 @@ ;; - unregister (file) COMMENTED OUT, MAY BE INCORRECT ;; * checkin (file rev comment) OK ;; * find-version (file rev buffer) OK -;; * checkout (file &optional editable rev) NOT NEEDED, COMMENTED OUT +;; * checkout (file &optional editable rev) OK ;; * revert (file &optional contents-done) OK ;; - cancel-version (file editable) ?? PROBABLY NOT NEEDED ;; - merge (file rev1 rev2) NEEDED @@ -113,10 +113,6 @@ (eval-when-compile (require 'vc)) -;; XXX This should be moved to vc-hooks after this gets a bit more -;; testing in the trunk. -(add-to-list 'vc-handled-backends 'HG) - ;;; Customization options (defcustom vc-hg-global-switches nil @@ -165,12 +161,39 @@ (if (eq 0 (length out)) 'up-to-date (let ((state (aref out 0))) (cond - ((eq state ?M) 'edited) ((eq state ?A) 'edited) - ((eq state ?P) 'needs-patch) + ((eq state ?M) 'edited) + ((eq state ?R) nil) ((eq state ??) nil) (t 'up-to-date))))))) +(defun vc-hg-dir-state (dir) + (with-temp-buffer + (vc-hg-command (current-buffer) nil nil "status") + (goto-char (point-min)) + (let ((status-char nil) + (file nil)) + (while (eq 0 (forward-line)) + (setq status-char (char-after)) + (setq file + (expand-file-name + (buffer-substring-no-properties (+ (point) 2) (line-end-position)))) + (cond + ;; The rest of the possible states in "hg status" output: + ;; R = removed + ;; ! = deleted, but still tracked + ;; ? = not tracked + ;; should not show up in vc-dired, so don't deal with them + ;; here. + ((eq status-char ?A) + (vc-file-setprop file 'vc-workfile-version "0") + (vc-file-setprop file 'vc-state 'edited)) + ((eq status-char ?M) + (vc-file-setprop file 'vc-state 'edited)) + ((eq status-char ??) + (vc-file-setprop file 'vc-backend 'none) + (vc-file-setprop file 'vc-state 'nil))))))) + (defun vc-hg-workfile-version (file) "Hg-specific version of `vc-workfile-version'." (let* @@ -355,22 +378,29 @@ REV is ignored." ;; Modelled after the similar function in vc-bzr.el ;; This should not be needed, `vc-hg-find-version' provides the same ;; functionality. -;; (defun vc-hg-checkout (file &optional editable rev workfile) -;; "Retrieve a revision of FILE into a WORKFILE. -;; EDITABLE is ignored. -;; REV is the revision to check out into WORKFILE." -;; (unless workfile -;; (setq workfile (vc-version-backup-file-name file rev))) -;; (let ((coding-system-for-read 'binary) -;; (coding-system-for-write 'binary)) -;; (with-temp-file workfile -;; (if rev -;; (vc-hg-command t nil file "cat" "-r" rev) -;; (vc-hg-command t nil file "cat"))))) +(defun vc-hg-checkout (file &optional editable rev) + "Retrieve a revision of FILE. +EDITABLE is ignored. +REV is the revision to check out into WORKFILE." + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (with-current-buffer (or (get-file-buffer file) (current-buffer)) + (if rev + (vc-hg-command t nil file "cat" "-r" rev) + (vc-hg-command t nil file "cat"))))) (defun vc-hg-checkout-model (file) 'implicit) +(defun vc-hg-dired-state-info (file) + "Hg-specific version of `vc-dired-state-info'." + (let ((hg-state (vc-state file))) + (if (eq hg-state 'edited) + (if (equal (vc-workfile-version file) "0") + "(added)" "(modified)") + ;; fall back to the default VC representation + (vc-default-dired-state-info 'HG file)))) + ;; Modelled after the similar function in vc-bzr.el (defun vc-hg-revert (file &optional contents-done) (unless contents-done -- cgit v1.2.1 From bac3c7494a51c0c9f8fb59c5e4bd866c5f21ae56 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:16:26 +0000 Subject: (when, unless): Doc fix. --- lisp/subr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 9ce4758a746..0849403bd51 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -103,7 +103,7 @@ change the list." When COND yields non-nil, eval BODY forms sequentially and return value of last one, or nil if there are none. -\(fn COND BODY ...)" +\(fn COND BODY...)" (declare (indent 1) (debug t)) (list 'if cond (cons 'progn body))) @@ -112,7 +112,7 @@ value of last one, or nil if there are none. When COND yields nil, eval BODY forms sequentially and return value of last one, or nil if there are none. -\(fn COND BODY ...)" +\(fn COND BODY...)" (declare (indent 1) (debug t)) (cons 'if (cons cond (cons nil body)))) -- cgit v1.2.1 From 6c4f5400cdcaf1a7917b84b90716c28dcad31989 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:17:51 +0000 Subject: (defadvice): Doc fix. --- lisp/emacs-lisp/advice.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index fe4639cf01a..6c51aa30f7c 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3771,7 +3771,7 @@ The syntax of `defadvice' is as follows: \(defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) [DOCSTRING] [INTERACTIVE-FORM] - BODY... ) + BODY...) FUNCTION ::= Name of the function to be advised. CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'. -- cgit v1.2.1 From a1aa5e1795cc2d5b5fe04f29acc62e0a5d58bbed Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:23:31 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fc3057761c..2a69af1c5f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-07-16 David Kastrup + + * emacs-lisp/advice.el (defadvice): Doc fix. + +2007-07-16 Juanma Barranquero + + * subr.el (when, unless): Doc fix. + 2007-07-16 Dan Nicolaescu * vc-hg.el (vc-hg-state): Handle removed files. @@ -45,8 +53,7 @@ * replace.el (match): Use yellow1 instead of yellow. - * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of - red. + * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of red. * pcvs-info.el (cvs-unknown): Likewise. @@ -126,7 +133,7 @@ 2007-07-02 Martin Rudalics - * help-mode.el (help-make-xrefs): Skip spaces too when skipping tabs. + * help-mode.el (help-make-xrefs): Skip spaces too when skipping tabs. * mouse.el (mouse-drag-mode-line-1): Quit mouse tracking when event is not a cons cell. Do not unread drag-mouse-1 events. -- cgit v1.2.1 From fc9c3ac9d6441589dcddac6e47e20a34fdd0223b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:31:56 +0000 Subject: (Ffind_operation_coding_system): Doc fix. --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coding.c b/src/coding.c index 6bb9f8225c9..b6bb3e486d8 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7472,7 +7472,7 @@ contents (not yet decoded). If `file-coding-system-alist' specifies a function to call for FILENAME, that function should examine the contents of BUFFER instead of reading the file. -usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) +usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) (nargs, args) int nargs; Lisp_Object *args; -- cgit v1.2.1 From 755ab04c0337d1a92db61ca04646230272b17460 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:33:02 +0000 Subject: (For, Fand, Fprogn): Doc fixes. --- src/eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eval.c b/src/eval.c index 4ce5c6d05a9..1ea662f8843 100644 --- a/src/eval.c +++ b/src/eval.c @@ -330,7 +330,7 @@ DEFUN ("or", For, Sor, 0, UNEVALLED, 0, doc: /* Eval args until one of them yields non-nil, then return that value. The remaining args are not evalled at all. If all args return nil, return nil. -usage: (or CONDITIONS ...) */) +usage: (or CONDITIONS...) */) (args) Lisp_Object args; { @@ -355,7 +355,7 @@ DEFUN ("and", Fand, Sand, 0, UNEVALLED, 0, doc: /* Eval args until one of them yields nil, then return nil. The remaining args are not evalled at all. If no arg yields nil, return the last arg's value. -usage: (and CONDITIONS ...) */) +usage: (and CONDITIONS...) */) (args) Lisp_Object args; { @@ -434,7 +434,7 @@ usage: (cond CLAUSES...) */) DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, doc: /* Eval BODY forms sequentially and return value of last one. -usage: (progn BODY ...) */) +usage: (progn BODY...) */) (args) Lisp_Object args; { -- cgit v1.2.1 From a0efc5b9e3f32682e7c9b3bca96f0c9783964d8a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:39:15 +0000 Subject: (Ftrack_mouse): Doc fix. --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index bda07473ccf..fb7686b3a4a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1422,7 +1422,7 @@ DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0, Within a `track-mouse' form, mouse motion generates input events that you can read with `read-event'. Normally, mouse motion is ignored. -usage: (track-mouse BODY ...) */) +usage: (track-mouse BODY...) */) (args) Lisp_Object args; { -- cgit v1.2.1 From 327ffff8e7a6728aaeb02fdcdd91b4cf0dd72ab3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:40:03 +0000 Subject: (Fwith_output_to_temp_buffer): Doc fix. --- src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print.c b/src/print.c index 533d0a82cc4..76716fe7c24 100644 --- a/src/print.c +++ b/src/print.c @@ -690,7 +690,7 @@ If variable `temp-buffer-show-function' is non-nil, call it at the end to get the buffer displayed instead of just displaying the non-selected buffer and calling the hook. It gets one argument, the buffer to display. -usage: (with-output-to-temp-buffer BUFNAME BODY ...) */) +usage: (with-output-to-temp-buffer BUFNAME BODY...) */) (args) Lisp_Object args; { -- cgit v1.2.1 From 1faa97e48fffba382c491cf322e870bbd154ea1f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 16 Jul 2007 10:43:34 +0000 Subject: (Fsave_window_excursion): Doc fix. --- src/ChangeLog | 11 ++++++++++- src/window.c | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2a68c99d328..c5d7ac769ba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2007-07-16 Juanma Barranquero + + * coding.c (Ffind_operation_coding_system): + * eval.c (For, Fand, Fprogn): + * keyboard.c (Ftrack_mouse): + * print.c (Fwith_output_to_temp_buffer): + * window.c (Fsave_window_excursion): Doc fixes (some reported + by Johan Bockg,Ae(Brd). + 2007-07-15 Richard Stallman * data.c (Fsetq_default): Doc fix. @@ -7549,7 +7558,7 @@ 2005-09-19 Kim F. Storm * editfns.c (Fformat): Don't scan past end of format string that - ends in %. Reported by: Johan Bockg,Ae(Brd. + ends in %. Reported by Johan Bockg,Ae(Brd. 2005-09-18 Andreas Schwab diff --git a/src/window.c b/src/window.c index 8a5137f2044..3cb4292d346 100644 --- a/src/window.c +++ b/src/window.c @@ -6643,7 +6643,7 @@ and the value of point and mark for each window. Also restore the choice of selected window. Also restore which buffer is current. Does not restore the value of point in current buffer. -usage: (save-window-excursion BODY ...) */) +usage: (save-window-excursion BODY...) */) (args) Lisp_Object args; { -- cgit v1.2.1 From 73770b0319301feeb63a9f29f9e108d94ccb4ff9 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 17 Jul 2007 04:48:56 +0000 Subject: Add more info about the vc-registered function. --- lisp/ChangeLog | 4 ++++ lisp/vc.el | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a69af1c5f3..062f1ce1dcc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-17 Dan Nicolaescu + + * vc.el: Add more info about the vc-registered function. + 2007-07-16 David Kastrup * emacs-lisp/advice.el (defadvice): Doc fix. diff --git a/lisp/vc.el b/lisp/vc.el index 580f16ce87b..37b7b46b603 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -106,8 +106,12 @@ ;; * registered (file) ;; ;; Return non-nil if FILE is registered in this backend. Both this -;; function as well as `state' should be careful to fail gracefully in the -;; event that the backend executable is absent. +;; function as well as `state' should be careful to fail gracefully +;; in the event that the backend executable is absent. It is +;; preferable that this function's body is autoloaded, that way only +;; calling vc-registered does not cause the backend to be loaded +;; (all the vc-FOO-registered functions are called to try to find +;; the controlling backend for FILE. ;; ;; * state (file) ;; -- cgit v1.2.1 From 23fe28f248284aeaefc144cbe6fbd3884992f938 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 17 Jul 2007 16:10:13 +0000 Subject: (bookmark-show-all-annotations): Make sure each inserted annotation ends with newline. --- lisp/bookmark.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 3c1469fef97..816ed8b182e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1794,7 +1794,8 @@ if an annotation exists." (if (and ann (not (string-equal ann ""))) ;; insert the annotation, indented by 4 spaces. (progn - (save-excursion (insert ann)) + (save-excursion (insert ann) (unless (bolp) + (insert "\n"))) (while (< (point) (point-max)) (beginning-of-line) ; paranoia (insert " ") -- cgit v1.2.1 From 089fb40e2782ed51463cc062f37fb4adbe26f83c Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 17 Jul 2007 16:14:25 +0000 Subject: (bookmark-maybe-sort-alist): Don't modify bookmark-alist. Instead, if not sorting, simply return it. (bookmark-bmenu-list): Call bookmark-maybe-sort-alist for its return value, not for its side effect. --- lisp/ChangeLog | 10 ++++++++++ lisp/bookmark.el | 11 +++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 062f1ce1dcc..30b8a11c088 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2007-07-17 Thien-Thi Nguyen + + * bookmark.el (bookmark-show-all-annotations): + Make sure each inserted annotation ends with newline. + + (bookmark-maybe-sort-alist): Don't modify + bookmark-alist. Instead, if not sorting, simply return it. + (bookmark-bmenu-list): Call bookmark-maybe-sort-alist + for its return value, not for its side effect. + 2007-07-17 Dan Nicolaescu * vc.el: Add more info about the vc-registered function. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 816ed8b182e..d0c131e386e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1044,10 +1044,10 @@ For example, if this is a Info buffer, return the Info file's name." ;;Return the bookmark-alist for display. If the bookmark-sort-flag ;;is non-nil, then return a sorted copy of the alist. (if bookmark-sort-flag - (setq bookmark-alist - (sort (copy-alist bookmark-alist) - (function - (lambda (x y) (string-lessp (car x) (car y)))))))) + (sort (copy-alist bookmark-alist) + (function + (lambda (x y) (string-lessp (car x) (car y))))) + bookmark-alist)) (defvar bookmark-after-jump-hook nil @@ -1568,7 +1568,6 @@ deletion, or > if it is flagged for displaying." (insert "% Bookmark\n- --------\n") (add-text-properties (point-min) (point) '(font-lock-face bookmark-menu-heading)) - (bookmark-maybe-sort-alist) (mapcar (lambda (full-record) ;; if a bookmark has an annotation, prepend a "*" @@ -1591,7 +1590,7 @@ deletion, or > if it is flagged for displaying." help-echo "mouse-2: go to this bookmark in other window"))) (insert "\n") ))) - bookmark-alist)) + (bookmark-maybe-sort-alist))) (goto-char (point-min)) (forward-line 2) (bookmark-bmenu-mode) -- cgit v1.2.1 From 6a34aec97fee10aa2a26dd79d1c9378236736a9b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 18 Jul 2007 12:40:30 +0000 Subject: (follow-mode-hook, follow-mode-off-hook, follow-mode, follow-delete-other-windows-and-split, follow-recenter, follow-windows-aligned-p, follow-point-visible-all-windows-p, follow-redisplay, follow-estimate-first-window-start, follow-xemacs-scrollbar-support, follow-intercept-process-output): Fix typos in docstrings. --- lisp/follow.el | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lisp/follow.el b/lisp/follow.el index 90555a786cc..9654e294d13 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -278,12 +278,12 @@ :group 'convenience) (defcustom follow-mode-hook nil - "Hooks to run when follow-mode is turned on." + "Hooks to run when Follow mode is turned on." :type 'hook :group 'follow) (defcustom follow-mode-off-hook nil - "Hooks to run when follow-mode is turned off." + "Hooks to run when Follow mode is turned off." :type 'hook :group 'follow) @@ -581,9 +581,9 @@ of two major techniques: movement commands. Follow mode comes to its prime when used on a large screen and two -side-by-side window are used. The user can, with the help of Follow +side-by-side windows are used. The user can, with the help of Follow mode, use two full-height windows as though they would have been -one. Imagine yourself editing a large function, or section of text, +one. Imagine yourself editing a large function, or section of text, and being able to use 144 lines instead of the normal 72... (your mileage may vary). @@ -591,7 +591,7 @@ To split one large window into two side-by-side windows, the commands `\\[split-window-horizontally]' or \ `M-x follow-delete-other-windows-and-split' can be used. -Only windows displayed in the same frame follow each-other. +Only windows displayed in the same frame follow each other. If the variable `follow-intercept-processes' is non-nil, Follow mode will listen to the output of processes and redisplay accordingly. @@ -725,11 +725,11 @@ Works like `scroll-up' when not in Follow Mode." Execute this command to display as much as possible of the text in the selected window. All other windows, in the current frame, are deleted and the selected window is split in two -side-by-side windows. Follow Mode is activated, hence the +side-by-side windows. Follow Mode is activated, hence the two windows always will display two successive pages. \(If one window is moved, the other one will follow.) -If ARG is positive, the leftmost window is selected. If it negative, +If ARG is positive, the leftmost window is selected. If negative, the rightmost is selected. If ARG is nil, the leftmost window is selected if the original window is the first one in the frame. @@ -834,8 +834,8 @@ in your `~/.emacs' file: Rearrange all other windows around the middle window. With a positive argument, place the current line ARG lines -from the top. With a negative, place it -ARG lines from the -bottom." +from the top. With a negative argument, place it -ARG lines +from the bottom." (interactive "P") (if arg (let ((p (point)) @@ -1065,7 +1065,7 @@ Note that this handles the case when the cache has been set to nil." ;; should start at a full screen line. (defsubst follow-windows-aligned-p (win-start-end) - "Non-nil if the follower WINDOWS are aligned." + "Non-nil if the follower windows are aligned." (let ((res t)) (save-excursion (goto-char (window-start (car (car win-start-end)))) @@ -1085,7 +1085,7 @@ Note that this handles the case when the cache has been set to nil." ;; no one will be recentered.) (defun follow-point-visible-all-windows-p (win-start-end) - "Non-nil when the window-point is visible in all windows." + "Non-nil when the `window-point' is visible in all windows." (let ((res t)) (while (and res win-start-end) (setq res (follow-pos-visible (window-point (car (car win-start-end))) @@ -1213,7 +1213,7 @@ Return the selected window." (defun follow-redisplay (&optional windows win) "Reposition the WINDOWS around WIN. Should the point be too close to the roof we redisplay everything -from the top. WINDOWS should contain a list of windows to +from the top. WINDOWS should contain a list of windows to redisplay, it is assumed that WIN is a member of the list. Should WINDOWS be nil, the windows displaying the same buffer as WIN, in the current frame, are used. @@ -1294,8 +1294,8 @@ START." (defun follow-estimate-first-window-start (windows win start) "Estimate the position of the first window. -Returns (EXACT . POS). If EXACT is non-nil, POS is the starting -position of the first window. Otherwise it is a good guess." +Returns (EXACT . POS). If EXACT is non-nil, POS is the starting +position of the first window. Otherwise it is a good guess." (let ((pred (car (follow-split-followers windows win))) (exact nil)) (save-excursion @@ -1747,7 +1747,7 @@ non-first windows in Follow Mode." (defun follow-xemacs-scrollbar-support (window) "Redraw windows showing the same buffer as shown in WINDOW. WINDOW is either the dragged window, or a cons containing the -window as its first element. This is called while the user drags +window as its first element. This is called while the user drags the scrollbar. WINDOW can be an object or a window." @@ -1877,7 +1877,7 @@ magic stuff before the real process filter is called." "Intercept all active processes. This is needed so that Follow Mode can track all display events in the -system. (See `follow-mode')" +system. (See `follow-mode'.)" (interactive) (let ((list (process-list))) (while list @@ -2084,8 +2084,8 @@ report this using the `report-emacs-bug' function." (defun follow-window-size-change (frame) "Redraw all windows in FRAME, when in Follow mode." - ;; Below, we call `post-command-hook'. This makes sure that we - ;; doesn't start a mutally recursive endless loop. + ;; Below, we call `post-command-hook'. This makes sure that we + ;; don't start a mutually recursive endless loop. (if follow-inside-post-command-hook nil (let ((buffers '()) @@ -2155,7 +2155,7 @@ report this using the `report-emacs-bug' function." ;;{{{ Tail window handling ;; In Emacs (not XEmacs) windows showing nothing are sometimes -;; recentered. When in Follow Mode, this is not desireable for +;; recentered. When in Follow Mode, this is not desirable for ;; non-first windows in the window chain. This section tries to ;; make the windows stay where they should be. ;; -- cgit v1.2.1 From ebdf47ca11d183e63f72d981ca45b29ee0af16f5 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 18 Jul 2007 12:50:56 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30b8a11c088..1f81860131e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2007-07-18 Juanma Barranquero + + * follow.el (follow-mode-hook, follow-mode-off-hook, follow-mode) + (follow-delete-other-windows-and-split, follow-recenter) + (follow-windows-aligned-p, follow-point-visible-all-windows-p) + (follow-redisplay, follow-estimate-first-window-start) + (follow-xemacs-scrollbar-support, follow-intercept-process-output): + Fix typos in docstrings. + 2007-07-17 Thien-Thi Nguyen * bookmark.el (bookmark-show-all-annotations): -- cgit v1.2.1 From 2b6e2f4db6ab7e1bc18962ae50c9c539f909c741 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 18 Jul 2007 22:20:42 +0000 Subject: (w32_executable_type): Handle 64 bit executables. --- src/ChangeLog | 4 ++++ src/w32proc.c | 75 ++++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c5d7ac769ba..af13ba0f303 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-07-18 Jason Rumney + + * w32proc.c (w32_executable_type): Handle 64 bit executables. + 2007-07-16 Juanma Barranquero * coding.c (Ffind_operation_coding_system): diff --git a/src/w32proc.c b/src/w32proc.c index 2120a51fb89..7d1717792ab 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -650,33 +650,54 @@ w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int } else if (nt_header->Signature == IMAGE_NT_SIGNATURE) { - /* Look for cygwin.dll in DLL import list. */ - IMAGE_DATA_DIRECTORY import_dir = - nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; - IMAGE_IMPORT_DESCRIPTOR * imports; - IMAGE_SECTION_HEADER * section; - - section = rva_to_section (import_dir.VirtualAddress, nt_header); - imports = RVA_TO_PTR (import_dir.VirtualAddress, section, executable); - - for ( ; imports->Name; imports++) - { - char * dllname = RVA_TO_PTR (imports->Name, section, executable); - - /* The exact name of the cygwin dll has changed with - various releases, but hopefully this will be reasonably - future proof. */ - if (strncmp (dllname, "cygwin", 6) == 0) - { - *is_cygnus_app = TRUE; - break; - } - } - - /* Check whether app is marked as a console or windowed (aka - GUI) app. Accept Posix and OS2 subsytem apps as console - apps. */ - *is_gui_app = (nt_header->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + IMAGE_DATA_DIRECTORY *data_dir = NULL; + if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) + { + /* Ensure we are using the 32 bit structure. */ + IMAGE_OPTIONAL_HEADER32 *opt + = (IMAGE_OPTIONAL_HEADER32*) &(nt_header->OptionalHeader); + data_dir = opt->DataDirectory; + *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + } + /* MingW 3.12 has the required 64 bit structs, but in case older + versions don't, only check 64 bit exes if we know how. */ +#ifdef IMAGE_NT_OPTIONAL_HDR64_MAGIC + else if (nt_header->OptionalHeader.Magic + == IMAGE_NT_OPTIONAL_HDR64_MAGIC) + { + IMAGE_OPTIONAL_HEADER64 *opt + = (IMAGE_OPTIONAL_HEADER64*) &(nt_header->OptionalHeader); + data_dir = opt->DataDirectory; + *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + } +#endif + if (data_dir) + { + /* Look for cygwin.dll in DLL import list. */ + IMAGE_DATA_DIRECTORY import_dir = + data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT]; + IMAGE_IMPORT_DESCRIPTOR * imports; + IMAGE_SECTION_HEADER * section; + + section = rva_to_section (import_dir.VirtualAddress, nt_header); + imports = RVA_TO_PTR (import_dir.VirtualAddress, section, + executable); + + for ( ; imports->Name; imports++) + { + char * dllname = RVA_TO_PTR (imports->Name, section, + executable); + + /* The exact name of the cygwin dll has changed with + various releases, but hopefully this will be reasonably + future proof. */ + if (strncmp (dllname, "cygwin", 6) == 0) + { + *is_cygnus_app = TRUE; + break; + } + } + } } } -- cgit v1.2.1 From ad54692916a0b5352369d5ead8d81f20adf6e9d7 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 19 Jul 2007 23:51:28 +0000 Subject: (vc-hg-registered): Replace if with when. (vc-hg-state): Deal with nonexistent files. --- lisp/ChangeLog | 5 +++++ lisp/vc-hg.el | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f81860131e..4aeeddf5633 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-19 Dan Nicolaescu + + * vc-hg.el (vc-hg-registered): Replace if with when. + (vc-hg-state): Deal with nonexistent files. + 2007-07-18 Juanma Barranquero * follow.el (follow-mode-hook, follow-mode-off-hook, follow-mode) diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 70488009232..8df01a2cc60 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -4,7 +4,6 @@ ;; Author: Ivan Kanis ;; Keywords: tools -;; Version: 1889 ;; This file is part of GNU Emacs. @@ -137,8 +136,8 @@ ;; Modelled after the similar function in vc-bzr.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." - (if (vc-hg-root file) ; short cut - (vc-hg-state file))) ; expensive + (when (vc-hg-root file) ; short cut + (vc-hg-state file))) ; expensive (defun vc-hg-state (file) "Hg-specific version of `vc-state'." @@ -159,13 +158,14 @@ (error nil))))))) (when (eq 0 status) (if (eq 0 (length out)) 'up-to-date - (let ((state (aref out 0))) - (cond - ((eq state ?A) 'edited) - ((eq state ?M) 'edited) - ((eq state ?R) nil) - ((eq state ??) nil) - (t 'up-to-date))))))) + (when (null (string-match ".*: No such file or directory$" out)) + (let ((state (aref out 0))) + (cond + ((eq state ?A) 'edited) + ((eq state ?M) 'edited) + ((eq state ?R) nil) + ((eq state ??) nil) + (t 'up-to-date)))))))) (defun vc-hg-dir-state (dir) (with-temp-buffer -- cgit v1.2.1 From 727bdea1064ff35f32e3055ba20d807625e5fe05 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 20 Jul 2007 06:54:40 +0000 Subject: (vc-hg-workfile-unchanged-p): New function. --- lisp/ChangeLog | 4 ++++ lisp/vc-hg.el | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4aeeddf5633..74984f03789 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-20 Dan Nicolaescu + + * vc-hg.el (vc-hg-workfile-unchanged-p): New function. + 2007-07-19 Dan Nicolaescu * vc-hg.el (vc-hg-registered): Replace if with when. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 8df01a2cc60..946a47e8f72 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -45,7 +45,7 @@ ;; * workfile-version (file) OK ;; - latest-on-branch-p (file) ?? ;; * checkout-model (file) OK -;; - workfile-unchanged-p (file) ?? +;; - workfile-unchanged-p (file) OK ;; - mode-line-string (file) NOT NEEDED ;; - dired-state-info (file) OK ;; STATE-CHANGING FUNCTIONS @@ -392,6 +392,10 @@ REV is the revision to check out into WORKFILE." (defun vc-hg-checkout-model (file) 'implicit) +;; Modelled after the similar function in vc-bzr.el +(defun vc-hg-workfile-unchanged-p (file) + (eq 'up-to-date (vc-hg-state file))) + (defun vc-hg-dired-state-info (file) "Hg-specific version of `vc-dired-state-info'." (let ((hg-state (vc-state file))) -- cgit v1.2.1 From 75be52584d49c52bfb5bc21563bc64640c3ea0b9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:20:58 +0000 Subject: (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32): Define if not defined. --- src/ChangeLog | 5 +++++ src/w32proc.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index af13ba0f303..a9303a47d6e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-07-20 Eli Zaretskii + + * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32): + Define if not defined. + 2007-07-18 Jason Rumney * w32proc.c (w32_executable_type): Handle 64 bit executables. diff --git a/src/w32proc.c b/src/w32proc.c index 7d1717792ab..8c99a0a1dff 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -590,6 +590,13 @@ get_result: return pid; } +/* Old versions of w32api headers don't have separate 32-bit and + 64-bit defines, but the one they have matches the 32-bit variety. */ +#ifndef IMAGE_NT_OPTIONAL_HDR32_MAGIC +# define IMAGE_NT_OPTIONAL_HDR32_MAGIC IMAGE_NT_OPTIONAL_HDR_MAGIC +# define IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER +#endif + void w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app) { -- cgit v1.2.1 From e4fe7e5e9515ca3bf38acdbc86f4449a23535186 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:27:27 +0000 Subject: (install-lisp-SH, install-lisp-CMD): New targets. (install): Use them to copy all *.el files before *.elc. (clean): Don't delete *~. --- lisp/ChangeLog | 6 ++++++ lisp/makefile.w32-in | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74984f03789..b6a9389a734 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-07-20 Eli Zaretskii + + * makefile.w32-in (install-lisp-SH, install-lisp-CMD): New targets. + (install): Use them to copy all *.el files before *.elc. + (clean): Don't delete *~. + 2007-07-20 Dan Nicolaescu * vc-hg.el (vc-hg-workfile-unchanged-p): New function. diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 6e8a3f5d39a..55b9f9ed5e2 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -429,17 +429,20 @@ install: # since cp does not preserve time stamps install-lisp-SH: cp -f *.el "$(INSTALL_DIR)/lisp" - for dir in $(WINS); do mkdir "$(INSTALL_DIR)/lisp/$$dir" && cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done + for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done + for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done install-lisp-CMD: cp -f *.el "$(INSTALL_DIR)/lisp" - for %%f in ($(WINS)) do mkdir "$(INSTALL_DIR)/lisp/%%f" + for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f" for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f" for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f" # # Maintenance # +# We used to delete *~ here, but that might inadvertently remove +# precious files if it happens to match their short 8+3 aliases. clean: - - $(DEL) *~ + - $(DEL) *.el~ -- cgit v1.2.1 From f37b8e41a1e0b9bbd5a8f553ec8b981a9bb2a48c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:32:26 +0000 Subject: (bootstrap, bootstrap-nmake, bootstrap-gmake): Depend on cmdproxy. (cleanall): Don't delete *~. --- nt/ChangeLog | 6 ++++++ nt/makefile.w32-in | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index 7f44ccbc008..56ca9da1bbe 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,9 @@ +2007-07-20 Eli Zaretskii + + * makefile.w32-in (bootstrap, bootstrap-nmake, bootstrap-gmake): + Depend on cmdproxy. + (cleanall): Don't delete *~. + 2007-07-11 Jason Rumney * gmake.defs (OLE32): New library to link. diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index f579855522e..69d53b357ae 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in @@ -138,10 +138,12 @@ maybe-bootstrap-SH: doit exit -1; \ fi -bootstrap: addsection bootstrap-$(MAKETYPE) +# Bootstrap depends on cmdproxy because some Lisp functions +# loaded during bootstrap may need to run shell commands. +bootstrap: addsection cmdproxy bootstrap-$(MAKETYPE) $(MAKE) $(MFLAGS) $(XMFLAGS) all -bootstrap-nmake: addsection +bootstrap-nmake: addsection cmdproxy cd ..\lisp $(MAKE) $(MFLAGS) bootstrap-clean cd ..\src @@ -151,18 +153,20 @@ bootstrap-nmake: addsection cd ..\src $(MAKE) $(MFLAGS) bootstrap $(MAKE) $(MFLAGS) bootstrap-clean + $(CP) $(BLD)/cmdproxy.exe ../bin cd ..\lisp $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap cd ..\lib-src $(MAKE) $(MFLAGS) DOC cd ..\nt -bootstrap-gmake: addsection +bootstrap-gmake: addsection cmdproxy $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean + $(CP) $(BLD)/cmdproxy.exe ../bin $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC @@ -248,7 +252,7 @@ info-gmake: # Maintenance # clean: clean-other-dirs-$(MAKETYPE) - - $(DEL) *~ $(COMPILER_TEMP_FILES) + - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) - $(DEL) stamp_BLD - $(DEL) ../etc/DOC ../etc/DOC-X @@ -287,6 +291,8 @@ cleanall-other-dirs-gmake: $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall +# We used to delete *~ here, but that might inadvertently remove +# precious files if it happens to match their short 8+3 aliases. cleanall: clean cleanall-other-dirs-$(MAKETYPE) - $(DEL_TREE) obj - $(DEL_TREE) obj-spd -- cgit v1.2.1 From b395d6e1f58998d74af97f78b09518f16ed40c20 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:43:01 +0000 Subject: (clean): Don't delete *~. --- src/ChangeLog | 2 ++ src/makefile.w32-in | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a9303a47d6e..008234b559a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2007-07-20 Eli Zaretskii + * makefile.w32-in (clean): Don't delete *~. + * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32): Define if not defined. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index ccb0dcf9f5f..c28e27bdfcb 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -247,8 +247,10 @@ install: $(ALL) # # Maintenance # +# We used to delete *~, s/*~, m/*~ here, but that might inadvertently +# remove precious files if it happens to match their short 8+3 aliases. clean: - - $(DEL) *~ "s/*~" "m/*~" + - $(DEL) "s/*.h~" "m/*.h~" - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) - $(DEL) stamp_BLD -- cgit v1.2.1 From effb3d94de938b9d1ab62423b9666a2ffb336ffc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:45:30 +0000 Subject: (clean): Don't delete *~. --- lib-src/ChangeLog | 4 ++++ lib-src/makefile.w32-in | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 262baf252a4..61975aa6cb8 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2007-07-20 Eli Zaretskii + + * makefile.w32-in (clean): Don't delete *~. + 2007-06-02 Chong Yidong * Version 22.1 released. diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 953fa7ae6be..b552160c759 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -324,8 +324,10 @@ install: $(INSTALL_FILES) # # Maintenance # +# We used to delete *~ here, but that might inadvertently remove +# precious files if it happens to match their short 8+3 aliases. clean: - - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES) + - $(DEL) DOC* $(COMPILER_TEMP_FILES) - $(DEL) ctags.c - $(DEL) getopt.h - $(DEL_TREE) $(OBJDIR) -- cgit v1.2.1 From 1d2646ccb61b4163dd1aae11ac5ddb2a7b03a563 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2007 19:50:36 +0000 Subject: (extraclean): Don't delete *~. --- leim/ChangeLog | 4 ++++ leim/makefile.w32-in | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/leim/ChangeLog b/leim/ChangeLog index f4bfce06bb3..a9b839212b4 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2007-07-20 Eli Zaretskii + + * makefile.w32-in (extraclean): Don't delete *~. + 2007-06-02 Chong Yidong * Version 22.1 released. diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 08022d38cf2..6f6508feceb 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in @@ -215,5 +215,7 @@ distclean: clean maintainer-clean: distclean - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) +# We used to delete *~ here, but that might inadvertently remove +# precious files if it happens to match their short 8+3 aliases. extraclean: maintainer-clean - - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) + - $(FOREACH) *.el~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) -- cgit v1.2.1 From 26716cc246dafe884123457cc1cd6bb17c39cf88 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 21 Jul 2007 09:06:17 +0000 Subject: (calculate-lisp-indent): In the case of alignment under a constant symbol, find and consider the sexp actually at indentation to be the "last sexp". --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/lisp-mode.el | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b6a9389a734..a37a2b0a658 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-07-21 Thien-Thi Nguyen + + * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the + case of alignment under a constant symbol, find and consider + the sexp actually at indentation to be the "last sexp". + 2007-07-20 Eli Zaretskii * makefile.w32-in (install-lisp-SH, install-lisp-CMD): New targets. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 374d3ae2327..3160af5d80d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -932,6 +932,16 @@ is the buffer position of the start of the containing expression." (goto-char indent-point) (skip-chars-forward " \t") (looking-at ":")) + ;; The last sexp may not be at the indentation + ;; where it begins, so find that one, instead. + (save-excursion + (goto-char calculate-lisp-indent-last-sexp) + (while (and (not (looking-back "^[ \t]*")) + (or (not containing-sexp) + (< (1+ containing-sexp) (point)))) + (forward-sexp -1) + (backward-prefix-chars)) + (setq calculate-lisp-indent-last-sexp (point))) (> calculate-lisp-indent-last-sexp (save-excursion (goto-char (1+ containing-sexp)) -- cgit v1.2.1 From 0c3b8cc477722c8eb6bc1b5e8de463ba1e0980aa Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 21 Jul 2007 17:51:13 +0000 Subject: (vc-hg-diff): Use vc-hg-command. (vc-hg-dir-state): Fix loop. (vc-hg-print-log): Fix expected return value for vc-hg-command. (vc-hg-next-version, vc-hg-delete-file, vc-hg-rename-file) (vc-hg-register, vc-hg-create-repo, vc-hg-checkin) (vc-hg-revert): Likewise. (vc-hg-revision-table, vc-hg-revision-completion-table): New functions. --- lisp/ChangeLog | 11 +++++++++++ lisp/vc-hg.el | 57 +++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a37a2b0a658..36bfbcafa89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-07-21 Dan Nicolaescu + + * vc-hg.el (vc-hg-diff): Use vc-hg-command. + (vc-hg-dir-state): Fix loop. + (vc-hg-print-log): Fix expected return value for vc-hg-command. + (vc-hg-next-version, vc-hg-delete-file, vc-hg-rename-file) + (vc-hg-register, vc-hg-create-repo, vc-hg-checkin) + (vc-hg-revert): Likewise. + (vc-hg-revision-table, vc-hg-revision-completion-table): New + functions. + 2007-07-21 Thien-Thi Nguyen * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 946a47e8f72..7fd8d5f532b 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -72,7 +72,7 @@ ;; - comment-history (file) NOT NEEDED ;; - update-changelog (files) NOT NEEDED ;; * diff (file &optional rev1 rev2 buffer) OK -;; - revision-completion-table (file) ?? +;; - revision-completion-table (file) OK ;; - diff-tree (dir &optional rev1 rev2) TEST IT ;; - annotate-command (file buf &optional rev) OK ;; - annotate-time () OK @@ -110,6 +110,7 @@ ;;; Code: (eval-when-compile + (require 'cl) (require 'vc)) ;;; Customization options @@ -173,11 +174,12 @@ (goto-char (point-min)) (let ((status-char nil) (file nil)) - (while (eq 0 (forward-line)) + (while (not (eobp)) (setq status-char (char-after)) (setq file (expand-file-name - (buffer-substring-no-properties (+ (point) 2) (line-end-position)))) + (buffer-substring-no-properties (+ (point) 2) + (line-end-position)))) (cond ;; The rest of the possible states in "hg status" output: ;; R = removed @@ -192,7 +194,8 @@ (vc-file-setprop file 'vc-state 'edited)) ((eq status-char ??) (vc-file-setprop file 'vc-backend 'none) - (vc-file-setprop file 'vc-state 'nil))))))) + (vc-file-setprop file 'vc-state 'nil))) + (forward-line))))) (defun vc-hg-workfile-version (file) "Hg-specific version of `vc-workfile-version'." @@ -270,15 +273,31 @@ (setq oldvers nil)) (if (and (not oldvers) newvers) (setq oldvers working)) - (apply 'call-process "hg" nil (or buffer "*vc-diff*") nil - "--cwd" (file-name-directory file) "diff" + (apply #'vc-hg-command (or buffer "*vc-diff*") nil + (file-name-nondirectory file) + "--cwd" (file-name-directory file) + "diff" (append (if oldvers (if newvers (list "-r" oldvers "-r" newvers) (list "-r" oldvers)) - (list "")) - (list (file-name-nondirectory file)))))) + (list "")))))) + +(defun vc-hg-revision-table (file) + (let ((default-directory (file-name-directory file))) + (with-temp-buffer + (vc-hg-command t nil file "log" "--template" "{rev} ") + (split-string + (buffer-substring-no-properties (point-min) (point-max)))))) + +;; Modelled after the similar function in vc-cvs.el +(defun vc-hg-revision-completion-table (file) + (lexical-let ((file file) + table) + (setq table (lazy-completion-table + table (lambda () (vc-hg-revision-table file)))) + table)) (defalias 'vc-hg-diff-tree 'vc-hg-diff) @@ -317,7 +336,7 @@ Optional arg VERSION is a version to annotate from." (let ((newrev (1+ (string-to-number rev))) (tip-version (with-temp-buffer - (vc-hg-command t nil nil "tip") + (vc-hg-command t 0 nil "tip") (goto-char (point-min)) (re-search-forward "^changeset:[ \t]*\\([0-9]+\\):") (string-to-number (match-string-no-properties 1))))) @@ -332,18 +351,18 @@ Optional arg VERSION is a version to annotate from." (condition-case () (delete-file file) (file-error nil)) - (vc-hg-command nil nil file "remove" "--after" "--force")) + (vc-hg-command nil 0 file "remove" "--after" "--force")) ;; Modelled after the similar function in vc-bzr.el (defun vc-hg-rename-file (old new) "Rename file from OLD to NEW using `hg mv'." - (vc-hg-command nil nil new old "mv")) + (vc-hg-command nil 0 new old "mv")) (defun vc-hg-register (file &optional rev comment) "Register FILE under hg. REV is ignored. COMMENT is ignored." - (vc-hg-command nil nil file "add")) + (vc-hg-command nil 0 file "add")) (defalias 'vc-hg-responsible-p 'vc-hg-root) @@ -366,18 +385,16 @@ COMMENT is ignored." (defun vc-hg-checkin (file rev comment) "HG-specific version of `vc-backend-checkin'. REV is ignored." - (vc-hg-command nil nil file "commit" "-m" comment)) + (vc-hg-command nil 0 files "commit" "-m" comment)) (defun vc-hg-find-version (file rev buffer) (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (if rev - (vc-hg-command buffer nil file "cat" "-r" rev) - (vc-hg-command buffer nil file "cat")))) + (vc-hg-command buffer 0 file "cat" "-r" rev) + (vc-hg-command buffer 0 file "cat")))) ;; Modelled after the similar function in vc-bzr.el -;; This should not be needed, `vc-hg-find-version' provides the same -;; functionality. (defun vc-hg-checkout (file &optional editable rev) "Retrieve a revision of FILE. EDITABLE is ignored. @@ -386,8 +403,8 @@ REV is the revision to check out into WORKFILE." (coding-system-for-write 'binary)) (with-current-buffer (or (get-file-buffer file) (current-buffer)) (if rev - (vc-hg-command t nil file "cat" "-r" rev) - (vc-hg-command t nil file "cat"))))) + (vc-hg-command t 0 file "cat" "-r" rev) + (vc-hg-command t 0 file "cat"))))) (defun vc-hg-checkout-model (file) 'implicit) @@ -408,7 +425,7 @@ REV is the revision to check out into WORKFILE." ;; Modelled after the similar function in vc-bzr.el (defun vc-hg-revert (file &optional contents-done) (unless contents-done - (with-temp-buffer (vc-hg-command t nil file "revert")))) + (with-temp-buffer (vc-hg-command t 0 file "revert")))) ;;; Internal functions -- cgit v1.2.1 From 99bfbfa9d2b07afc516afce5b41fc62a73f365d8 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 21 Jul 2007 23:47:30 +0000 Subject: (image-dired-sane-db-file): New func. (image-dired-write-tags, image-dired-remove-tag) (image-dired-list-tags, image-dired-write-comments) (image-dired-get-comment, image-dired-mark-tagged-files) (image-dired-create-gallery-lists): Call new func. --- lisp/ChangeLog | 9 +++++++++ lisp/image-dired.el | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 36bfbcafa89..2b3c70b7ed1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2007-07-21 Thien-Thi Nguyen + + * image-dired.el (image-dired-sane-db-file): New func. + (image-dired-write-tags, image-dired-remove-tag) + (image-dired-list-tags, image-dired-write-comments) + (image-dired-get-comment, image-dired-mark-tagged-files) + (image-dired-create-gallery-lists): Call new func. + Reported by Dieter Wilhelm . + 2007-07-21 Dan Nicolaescu * vc-hg.el (vc-hg-diff): Use vc-hg-command. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 867c50df013..db6415977b4 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -866,11 +866,28 @@ displayed." ;;;###autoload (defalias 'tumme 'image-dired-show-all-from-dir) +(defun image-dired-sane-db-file () + "Check if `image-dired-db-file' exists. +If not, try to create it (including any parent directories). +Signal error if there are problems creating it." + (or (file-exists-p image-dired-db-file) + (let (dir buf) + (unless (file-directory-p (setq dir (file-name-directory + image-dired-db-file))) + (make-directory dir t)) + (with-current-buffer (setq buf (create-file-buffer + image-dired-db-file)) + (write-file image-dired-db-file)) + (kill-buffer buf) + (file-exists-p image-dired-db-file)) + (error "Could not create %s" image-dired-db-file))) + (defun image-dired-write-tags (file-tags) "Write file tags to database. Write each file and tag in FILE-TAGS to the database. FILE-TAGS is an alist in the following form: ((FILE . TAG) ... )" + (image-dired-sane-db-file) (let (end file tag) (with-temp-file image-dired-db-file (insert-file-contents image-dired-db-file) @@ -890,6 +907,7 @@ is an alist in the following form: (defun image-dired-remove-tag (files tag) "For all FILES, remove TAG from the image database." + (image-dired-sane-db-file) (save-excursion (let (end buf start) (setq buf (find-file image-dired-db-file)) @@ -924,6 +942,7 @@ is an alist in the following form: (defun image-dired-list-tags (file) "Read all tags for image FILE from the image database." + (image-dired-sane-db-file) (save-excursion (let (end buf (tags "")) (setq buf (find-file image-dired-db-file)) @@ -2035,6 +2054,7 @@ function. The result is a couple of new files in Write file comments to one or more files. FILE-COMMENTS is an alist on the following form: ((FILE . COMMENT) ... )" + (image-dired-sane-db-file) (let (end comment-beg-pos comment-end-pos file comment) (with-temp-file image-dired-db-file (insert-file-contents image-dired-db-file) @@ -2105,6 +2125,7 @@ as initial value." (defun image-dired-get-comment (file) "Get comment for file FILE." + (image-dired-sane-db-file) (save-excursion (let (end buf comment-beg-pos comment-end-pos comment) (setq buf (find-file image-dired-db-file)) @@ -2133,6 +2154,7 @@ lets you input a regexp and this will be matched against all tags on all image files in the database file. The files that have a matching tags will be marked in the dired buffer." (interactive) + (image-dired-sane-db-file) (let ((tag (read-string "Mark tagged files (regexp): ")) (hits 0) files buf) @@ -2297,6 +2319,7 @@ image-dired-file-comment-list: (defun image-dired-create-gallery-lists () "Create temporary lists used by `image-dired-gallery-generate'." + (image-dired-sane-db-file) (let ((buf (find-file image-dired-db-file)) end beg file row-tags) (setq image-dired-tag-file-list nil) -- cgit v1.2.1 From a0f55a1df2268d4639fd80ef1fab11f355bb7f5c Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Sun, 22 Jul 2007 09:02:02 +0000 Subject: (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/reftex.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2b3c70b7ed1..5275d798a83 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-22 Ralf Angeli + + * textmodes/reftex.el (reftex-access-parse-file): Create parse + file in a way that does not interfere with recentf. + 2007-07-21 Thien-Thi Nguyen * image-dired.el (image-dired-sane-db-file): New func. diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 343a7c5a947..4b34c67aee3 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1333,7 +1333,7 @@ Valid actions are: readable, restore, read, kill, write." (if (file-writable-p file) (progn (message "Writing parse file %s" (abbreviate-file-name file)) - (find-file file) + (set-buffer (get-buffer-create file)) (erase-buffer) (insert (format ";; RefTeX parse info file\n")) (insert (format ";; File: %s\n" master)) @@ -1358,7 +1358,7 @@ Valid actions are: readable, restore, read, kill, write." (t (print x)))) list)) (insert "))\n\n") - (save-buffer 0) + (write-region (point-min) (point-max) file nil 'silent) (kill-buffer (current-buffer))) (error "Cannot write to file %s" file))) t)))) -- cgit v1.2.1 From 3f235d5d30e920586915fd621ce50b62f37ffdba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 22 Jul 2007 12:17:05 +0000 Subject: (x-handle-no-bitmap-icon): New function. --- lisp/term/x-win.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index e48d97d6d1b..d0489844d76 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -129,6 +129,9 @@ initial-frame-alist) x-invocation-args (cdr x-invocation-args))))))) +(defun x-handle-no-bitmap-icon (switch) + (setq default-frame-alist (cons '(icon-type) default-frame-alist))) + ;; Make -iconic apply only to the initial frame! (defun x-handle-iconic (switch) (setq initial-frame-alist -- cgit v1.2.1 From af849acd5d7cfb41c5ab91095a9757575c3da826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 22 Jul 2007 12:17:31 +0000 Subject: (command-line-x-option-alist): Use x-handle-no-bitmap-icon. --- lisp/ChangeLog | 6 ++++++ lisp/startup.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5275d798a83..a30aa13f073 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-07-22 Jan Dj,Ad(Brv + + * startup.el (command-line-x-option-alist): Use x-handle-no-bitmap-icon. + + * term/x-win.el (x-handle-no-bitmap-icon): New function. + 2007-07-22 Ralf Angeli * textmodes/reftex.el (reftex-access-parse-file): Create parse diff --git a/lisp/startup.el b/lisp/startup.el index f57bf66a3a0..37336d45e29 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -144,7 +144,7 @@ This is normally copied from `default-directory' when Emacs starts.") ("--foreground-color" 1 x-handle-switch foreground-color) ("--background-color" 1 x-handle-switch background-color) ("--mouse-color" 1 x-handle-switch mouse-color) - ("--no-bitmap-icon" 0 x-handle-switch icon-type nil) + ("--no-bitmap-icon" 0 x-handle-no-bitmap-icon) ("--iconic" 0 x-handle-iconic) ("--xrm" 1 x-handle-xrm-switch) ("--cursor-color" 1 x-handle-switch cursor-color) -- cgit v1.2.1 From 49bbf1b953d9ef97fa9398a90e66b6f9fc340321 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Sun, 22 Jul 2007 18:55:07 +0000 Subject: (reftex-access-parse-file): Do not risk destroying an existing buffer. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/reftex.el | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a30aa13f073..39852c22ab2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-22 Ralf Angeli + + * textmodes/reftex.el (reftex-access-parse-file): Do not risk + destroying an existing buffer. + 2007-07-22 Jan Dj,Ad(Brv * startup.el (command-line-x-option-alist): Use x-handle-no-bitmap-icon. diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 4b34c67aee3..200d271d631 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1331,10 +1331,8 @@ Valid actions are: readable, restore, read, kill, write." (put docstruct-symbol 'modified nil) (save-excursion (if (file-writable-p file) - (progn + (with-temp-file file (message "Writing parse file %s" (abbreviate-file-name file)) - (set-buffer (get-buffer-create file)) - (erase-buffer) (insert (format ";; RefTeX parse info file\n")) (insert (format ";; File: %s\n" master)) (insert (format ";; User: %s (%s)\n\n" @@ -1357,9 +1355,7 @@ Valid actions are: readable, restore, read, kill, write." ) (t (print x)))) list)) - (insert "))\n\n") - (write-region (point-min) (point-max) file nil 'silent) - (kill-buffer (current-buffer))) + (insert "))\n\n")) (error "Cannot write to file %s" file))) t)))) -- cgit v1.2.1 From e81ab986428e7c45c3e7ac2ae6bf52f39dfcefbf Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 22 Jul 2007 22:35:10 +0000 Subject: (isearch-edit-string): Save old point and isearch-other-end to old-point and old-other-end before reading the search string from minibuffer. After exiting minibuffer set point to old-other-end if point and the search direction is the same as before reading the search string. (isearch-del-char): Don't set isearch-yank-flag to t. Put point to isearch-other-end. Instead of isearch-search-and-update call three functions isearch-search, isearch-push-state and isearch-update. --- lisp/ChangeLog | 11 +++++++++++ lisp/isearch.el | 25 ++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39852c22ab2..2d63c163eea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-07-22 Juri Linkov + + * isearch.el (isearch-edit-string): Save old point and + isearch-other-end to old-point and old-other-end before reading + the search string from minibuffer. After exiting minibuffer set + point to old-other-end if point and the search direction is the + same as before reading the search string. + (isearch-del-char): Don't set isearch-yank-flag to t. Put point + to isearch-other-end. Instead of isearch-search-and-update call + three functions isearch-search, isearch-push-state and isearch-update. + 2007-07-22 Ralf Angeli * textmodes/reftex.el (reftex-access-parse-file): Do not risk diff --git a/lisp/isearch.el b/lisp/isearch.el index 71e5e4bccd3..00e7f1cc306 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -992,7 +992,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst isearch-original-minibuffer-message-timeout) (isearch-original-minibuffer-message-timeout isearch-original-minibuffer-message-timeout) - ) + old-point old-other-end) ;; Actually terminate isearching until editing is done. ;; This is so that the user can do anything without failure, @@ -1001,6 +1001,10 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst (isearch-done t t) (exit nil)) ; was recursive editing + ;; Save old point and isearch-other-end before reading from minibuffer + ;; that can change their values. + (setq old-point (point) old-other-end isearch-other-end) + (isearch-message) ;; for read-char (unwind-protect (let* (;; Why does following read-char echo? @@ -1036,6 +1040,14 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst isearch-new-message (mapconcat 'isearch-text-char-description isearch-new-string ""))) + + ;; Set point at the start (end) of old match if forward (backward), + ;; so after exiting minibuffer isearch resumes at the start (end) + ;; of this match and can find it again. + (if (and old-other-end (eq old-point (point)) + (eq isearch-forward isearch-new-forward)) + (goto-char old-other-end)) + ;; Always resume isearching by restarting it. (isearch-mode isearch-forward isearch-regexp @@ -1260,10 +1272,13 @@ If search string is empty, just beep." (ding) (setq isearch-string (substring isearch-string 0 (- (or arg 1))) isearch-message (mapconcat 'isearch-text-char-description - isearch-string "") - ;; Don't move cursor in reverse search. - isearch-yank-flag t)) - (isearch-search-and-update)) + isearch-string ""))) + ;; Use the isearch-other-end as new starting point to be able + ;; to find the remaining part of the search string again. + (if isearch-other-end (goto-char isearch-other-end)) + (isearch-search) + (isearch-push-state) + (isearch-update)) (defun isearch-yank-string (string) "Pull STRING into search string." -- cgit v1.2.1 From 4fc066e16472fe985ebc34eb9b2b4e37a53a074c Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 22 Jul 2007 22:53:48 +0000 Subject: (set-default-process-coding-system): Use dos line ends for input to cmdproxy on all versions of Windows. Use dos line ends for input to plink. --- lisp/w32-fns.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 26aafeb27fc..fc5afd76664 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -149,14 +149,19 @@ You should set this to t when using a non-system shell.\n\n")))) (if default-enable-multibyte-characters '(undecided-dos . undecided-unix) '(raw-text-dos . raw-text-unix))) - (or (w32-using-nt) - ;; On Windows 9x, make cmdproxy default to using DOS line endings - ;; for input, because command.com requires this. - (setq process-coding-system-alist - `(("[cC][mM][dD][pP][rR][oO][xX][yY]" - . ,(if default-enable-multibyte-characters - '(undecided-dos . undecided-dos) - '(raw-text-dos . raw-text-dos))))))) + ;; Make cmdproxy default to using DOS line endings for input, + ;; because some Windows programs (including command.com) require it. + (add-to-list 'process-coding-system-alist + `("[cC][mM][dD][pP][rR][oO][xX][yY]" + . ,(if default-enable-multibyte-characters + '(undecided-dos . undecided-dos) + '(raw-text-dos . raw-text-dos)))) + ;; plink needs DOS input when entering the password. + (add-to-list 'process-coding-system-alist + `("[pP][lL][iI][nN][kK]" + . ,(if default-enable-multibyte-characters + '(undecided-dos . undecided-dos) + '(raw-text-dos . raw-text-dos))))) (add-hook 'before-init-hook 'set-default-process-coding-system) -- cgit v1.2.1 From d93290ed100772393a6ced91c49675e169b58ea3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 22 Jul 2007 22:55:09 +0000 Subject: (comint-simple-send): Concat newline before sending. (comint-password-prompt-regexp): Recognize plink's passphrase prompt. --- lisp/ChangeLog | 9 +++++++++ lisp/comint.el | 18 ++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d63c163eea..6f3da013030 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2007-07-22 Jason Rumney + + * w32-fns.el (set-default-process-coding-system): Use dos line ends + for input to cmdproxy on all versions of Windows. + Use dos line ends for input to plink. + + * comint.el (comint-simple-send): Concat newline before sending. + (comint-password-prompt-regexp): Recognize plink's passphrase prompt. + 2007-07-22 Juri Linkov * isearch.el (isearch-edit-string): Save old point and diff --git a/lisp/comint.el b/lisp/comint.el index 7d81f357e22..43d12946fce 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -333,12 +333,13 @@ This variable is buffer-local." ;; kinit prints a prompt like `Password for devnull@GNU.ORG: '. ;; ksu prints a prompt like `Kerberos password for devnull/root@GNU.ORG: '. ;; ssh-add prints a prompt like `Enter passphrase: '. +;; plink prints a prompt like `Passphrase for key "root@GNU.ORG": '. ;; Some implementations of passwd use "Password (again)" as the 2nd prompt. (defcustom comint-password-prompt-regexp "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\ \[Pp]assword\\( (again)\\)?\\|\ -pass phrase\\|\\(Enter\\|Repeat\\|Bad\\) passphrase\\)\ +pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\ \\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'" "*Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'." @@ -1953,11 +1954,16 @@ If this takes us past the end of the current line, don't skip at all." "Default function for sending to PROC input STRING. This just sends STRING plus a newline. To override this, set the hook `comint-input-sender'." - (comint-send-string proc string) - (if comint-input-sender-no-newline - (if (not (string-equal string "")) - (process-send-eof)) - (comint-send-string proc "\n"))) + (let ((send-string + (if comint-input-sender-no-newline + string + ;; Sending as two separate strings does not work + ;; on Windows, so concat the \n before sending. + (concat string "\n")))) + (comint-send-string proc send-string)) + (if (and comint-input-sender-no-newline + (not (string-equal string ""))) + (process-send-eof))) (defun comint-line-beginning-position () "Return the buffer position of the beginning of the line, after any prompt. -- cgit v1.2.1 From 7d56ddc5764b329ff315706e7e2a7eba34e60201 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 23 Jul 2007 05:32:32 +0000 Subject: (cvs-mode-add-change-log-entry-other-window): Use a directory name for buffer-file-name if it refers to a directory. --- lisp/ChangeLog | 27 +++++++++++++++------------ lisp/pcvs.el | 4 ++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f3da013030..2e3f32ad25c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-23 Stefan Monnier + + * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use a directory + name for buffer-file-name if it refers to a directory. + 2007-07-22 Jason Rumney * w32-fns.el (set-default-process-coding-system): Use dos line ends @@ -51,8 +56,7 @@ (vc-hg-next-version, vc-hg-delete-file, vc-hg-rename-file) (vc-hg-register, vc-hg-create-repo, vc-hg-checkin) (vc-hg-revert): Likewise. - (vc-hg-revision-table, vc-hg-revision-completion-table): New - functions. + (vc-hg-revision-table, vc-hg-revision-completion-table): New functions. 2007-07-21 Thien-Thi Nguyen @@ -186,8 +190,8 @@ * longlines.el (longlines-wrap-region): Avoid marking buffer as modified. - (longlines-auto-wrap, longlines-window-change-function): Remove - unnecessary calls to set-buffer-modified-p. + (longlines-auto-wrap, longlines-window-change-function): + Remove unnecessary calls to set-buffer-modified-p. 2007-06-20 Stefan Monnier @@ -496,8 +500,8 @@ * calendar/timeclock.el: Update version number. (timeclock-modeline-display): Mention timeclock-use-display-time in explanatory message. - (timeclock-log): Suppress warnings when finding the log. Don't - check for a nil project twice. Run hooks after killing the + (timeclock-log): Suppress warnings when finding the log. + Don't check for a nil project twice. Run hooks after killing the buffer (if applicable). (timeclock-geometric-mean): Rename to `timeclock-mean' (it never was geometric). All uses changed. @@ -515,8 +519,8 @@ 2007-06-04 Katsumi Yamaoka - * mail/mail-extr.el (mail-extract-address-components): Recognize - non-ASCII characters except for NBSP as words. + * mail/mail-extr.el (mail-extract-address-components): + Recognize non-ASCII characters except for NBSP as words. 2007-06-04 Ryan Yeske @@ -544,8 +548,7 @@ * files.el (magic-mode-alist): Remove image-type-auto-detected-p. (magic-fallback-mode-alist): Add image-type-auto-detected-p. - * image.el (image-type-auto-detected-p): Don't scan - auto-mode-alist. + * image.el (image-type-auto-detected-p): Don't scan auto-mode-alist. * longlines.el (longlines-mode): Make longlines-auto-wrap buffer-local. Add hooks unconditionally. @@ -569,8 +572,8 @@ 2007-05-29 Martin Rudalics * textmodes/table.el (table--point-entered-cell-function) - (table--point-left-cell-function): Bind - `inhibit-point-motion-hooks' to t. + (table--point-left-cell-function): + Bind `inhibit-point-motion-hooks' to t. 2007-05-29 Nikolaj Schumacher (tiny change) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 006b2cd905b..12ad6f5e2a0 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -2207,6 +2207,10 @@ With prefix argument, prompt for cvs flags." (dolist (fi (cvs-mode-marked nil nil)) (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) + (if (file-directory-p buffer-file-name) + ;; Be careful to use a directory name, otherwise add-log starts + ;; looking for a ChangeLog file in the parent dir. + (setq buffer-file-name (file-name-as-directory buffer-file-name))) (kill-local-variable 'change-log-default-name) (save-excursion (add-change-log-entry-other-window))))) -- cgit v1.2.1 From 4127ed49c36b9df647d5278be28e1307d9b17cc9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 23 Jul 2007 05:38:44 +0000 Subject: (vc-find-root): Walk up the tree to find an existing `file' from which to start the search and fix case where `file' is the current directory and the root as well. --- lisp/ChangeLog | 4 ++++ lisp/vc-hooks.el | 25 ++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e3f32ad25c..e6a15595af2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2007-07-23 Stefan Monnier + * vc-hooks.el (vc-find-root): Walk up the tree to find an existing + `file' from which to start the search and fix case where `file' is the + current directory and the root as well. + * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use a directory name for buffer-file-name if it refers to a directory. diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 22935ab7f3b..29c827852fb 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -314,22 +314,25 @@ The function walks up the directory tree from FILE looking for WITNESS. If WITNESS if not found, return nil, otherwise return the root." ;; Represent /home/luser/foo as ~/foo so that we don't try to look for ;; witnesses in /home or in /. + (while (not (file-directory-p file)) + (setq file (file-name-directory (directory-file-name file)))) (setq file (abbreviate-file-name file)) (let ((root nil) (user (nth 2 (file-attributes file)))) (while (not (or root - (equal file (setq file (file-name-directory file))) - (null file) - ;; As a heuristic, we stop looking up the hierarchy of - ;; directories as soon as we find a directory belonging - ;; to another user. This should save us from looking in - ;; things like /net and /afs. This assumes that all the - ;; files inside a project belong to the same user. - (not (equal user (nth 2 (file-attributes file)))) - (string-match vc-ignore-dir-regexp file))) + (null file) + ;; As a heuristic, we stop looking up the hierarchy of + ;; directories as soon as we find a directory belonging + ;; to another user. This should save us from looking in + ;; things like /net and /afs. This assumes that all the + ;; files inside a project belong to the same user. + (not (equal user (nth 2 (file-attributes file)))) + (string-match vc-ignore-dir-regexp file))) (if (file-exists-p (expand-file-name witness file)) - (setq root file) - (setq file (directory-file-name file)))) + (setq root file) + (if (equal file + (setq file (file-name-directory (directory-file-name file)))) + (setq file nil)))) root)) ;; Access functions to file properties -- cgit v1.2.1 From bdef712c490ff78e563550641fbeeba48c7dea9f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 23 Jul 2007 13:07:29 +0000 Subject: (sh-font-lock-backslash-quote, sh-font-lock-flush-syntax-ppss-cache): New funs. (sh-font-lock-syntactic-keywords): Use them to distinguish the different possible cases for \'. (sh-font-lock-paren): Mark the relevant text with font-lock-multiline. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/sh-script.el | 48 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6a15595af2..6bf3e1a15fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2007-07-23 Stefan Monnier + * progmodes/sh-script.el: (sh-font-lock-backslash-quote) + (sh-font-lock-flush-syntax-ppss-cache): New funs. + (sh-font-lock-syntactic-keywords): Use them to distinguish the + different possible cases for \'. + (sh-font-lock-paren): Mark the relevant text with font-lock-multiline. + * vc-hooks.el (vc-find-root): Walk up the tree to find an existing `file' from which to start the search and fix case where `file' is the current directory and the root as well. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 60fc4c43e7b..39d51e78a0f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -171,10 +171,6 @@ ;; disadvantages: ;; 1. We need to scan the buffer to find which ")" symbols belong to a ;; case alternative, to find any here documents, and handle "$#". -;; 2. Setting the text property makes the buffer modified. If the -;; buffer is read-only buffer we have to cheat and bypass the read-only -;; status. This is for cases where the buffer started read-only buffer -;; but the user issued `toggle-read-only'. ;; ;; Bugs ;; ---- @@ -183,6 +179,16 @@ ;; ;; - `sh-learn-buffer-indent' is extremely slow. ;; +;; - "case $x in y) echo ;; esac)" the last ) is mis-identified as being +;; part of a case-pattern. You need to add a semi-colon after "esac" to +;; coerce sh-script into doing the right thing. +;; +;; - "echo $z in ps | head)" the last ) is mis-identified as being part of +;; a case-pattern. You need to put the "in" between quotes to coerce +;; sh-script into doing the right thing. +;; +;; - A line starting with "}>foo" is not indented like "} >foo". +;; ;; Richard Sharman June 1999. ;;; Code: @@ -884,7 +890,7 @@ See `sh-feature'.") (defconst sh-here-doc-syntax (string-to-syntax "|")) ;; generic string (defconst sh-escaped-line-re - ;; Should match until the real end-of-continued line, but if that is not + ;; Should match until the real end-of-continued-line, but if that is not ;; possible (because we bump into EOB or the search bound), then we should ;; match until the search bound. "\\(?:\\(?:.*[^\\\n]\\)?\\(?:\\\\\\\\\\)*\\\\\n\\)*.*") @@ -1059,9 +1065,33 @@ subshells can nest." (backward-char 1)) (when (eq (char-before) ?|) (backward-char 1) t))) - (when (save-excursion (backward-char 2) (looking-at ";;\\|in")) + ;; FIXME: ";; esac )" is a case that looks like a case-pattern but it's + ;; really just a close paren after a case statement. I.e. if we skipped + ;; over `esac' just now, we're not looking at a case-pattern. + (when (progn (backward-char 2) + (if (> start (line-end-position)) + (put-text-property (point) (1+ start) + 'font-lock-multiline t)) + ;; FIXME: The `in' may just be a random argument to + ;; a normal command rather than the real `in' keyword. + ;; I.e. we should look back to try and find the + ;; corresponding `case'. + (looking-at ";;\\|in")) sh-st-punc))) +(defun sh-font-lock-backslash-quote () + (if (eq (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) ?\') + ;; In a '...' the backslash is not escaping. + sh-st-punc + nil)) + +(defun sh-font-lock-flush-syntax-ppss-cache (limit) + ;; This should probably be a standard function provided by font-lock.el + ;; (or syntax.el). + (syntax-ppss-flush-cache (point)) + (goto-char limit) + nil) + (defun sh-apply-quoted-subshell () "Apply the `sh-st-punc' syntax to all the matches in `match-data'. This is used to flag quote characters in subshell constructs inside strings @@ -1080,7 +1110,11 @@ This is used to flag quote characters in subshell constructs inside strings ;; of the shell command language (under `quoting') but with `$' removed. `(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol) ;; In a '...' the backslash is not escaping. - ("\\(\\\\\\)'" 1 ,sh-st-punc) + ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) + ;; The previous rule uses syntax-ppss, but the subsequent rules may + ;; change the syntax, so we have to tell syntax-ppss that the states it + ;; has just computed will need to be recomputed. + (sh-font-lock-flush-syntax-ppss-cache) ;; Make sure $@ and @? are correctly recognized as sexps. ("\\$\\([?@]\\)" 1 ,sh-st-symbol) ;; Find HEREDOC starters and add a corresponding rule for the ender. -- cgit v1.2.1 From 6145f7fdfe318bc3f13aa03c083bfcd489bd9d83 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 23 Jul 2007 17:55:00 +0000 Subject: (inferior-octave-prompt): Accept .exe. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/octave-inf.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6bf3e1a15fa..9ed3c322922 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-23 Richard Stallman + + * progmodes/octave-inf.el (inferior-octave-prompt): Accept .exe. + 2007-07-23 Stefan Monnier * progmodes/sh-script.el: (sh-font-lock-backslash-quote) diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 63f9af50c1e..b46510b5ac9 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -42,7 +42,7 @@ :group 'octave-inferior) (defcustom inferior-octave-prompt - "\\(^octave\\(\\|.bin\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " + "\\(^octave\\(\\|.bin\\|.exe\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " "Regexp to match prompts for the inferior Octave process." :type 'regexp :group 'octave-inferior) -- cgit v1.2.1 From ae59e8884655055609aafcd9bf2d405936018802 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 23 Jul 2007 21:49:42 +0000 Subject: (ses-cleanup): Prevent Emacs from spuriously checking if the underlying file is uptodate. --- lisp/ChangeLog | 5 +++++ lisp/ses.el | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9ed3c322922..46624565600 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-07-23 Stefan Monnier + + * ses.el (ses-cleanup): Prevent Emacs from spuriously checking if the + underlying file is uptodate. + 2007-07-23 Richard Stallman * progmodes/octave-inf.el (inferior-octave-prompt): Accept .exe. diff --git a/lisp/ses.el b/lisp/ses.el index 4f51c803de1..c729ca4b432 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1470,17 +1470,22 @@ Narrows the buffer to show only the print area. Gives it `read-only' and (overlay-put ses--curcell-overlay 'face 'underline)) (defun ses-cleanup () - "Cleanup when changing a buffer from SES mode to something else. Delete -overlay, remove special text properties." + "Cleanup when changing a buffer from SES mode to something else. +Delete overlays, remove special text properties." (widen) (let ((inhibit-read-only t) + ;; When reverting, hide the buffer name, otherwise Emacs will ask + ;; the user "the file is modified, do you really want to make + ;; modifications to this buffer", where the "modifications" refer to + ;; the irrelevant set-text-properties below. + (buffer-file-name nil) (was-modified (buffer-modified-p))) ;;Delete read-only, keymap, and intangible properties (set-text-properties (point-min) (point-max) nil) ;;Delete overlay (mapc 'delete-overlay (overlays-in (point-min) (point-max))) (unless was-modified - (set-buffer-modified-p nil)))) + (restore-buffer-modified-p nil)))) ;;;###autoload (defun ses-mode () -- cgit v1.2.1 From 50624218533c7b9a199d40fd56b6f31b6b2ef8ac Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 23 Jul 2007 22:35:46 +0000 Subject: (current_lock_owner): Allow for @ sign in username. --- src/ChangeLog | 4 ++++ src/filelock.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 008234b559a..f3829dcfd55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-07-23 Jason Rumney + + * filelock.c (current_lock_owner): Allow for @ sign in username. + 2007-07-20 Eli Zaretskii * makefile.w32-in (clean): Don't delete *~. diff --git a/src/filelock.c b/src/filelock.c index 689a80a4209..d654964e0fa 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -468,8 +468,8 @@ current_lock_owner (owner, lfname) } /* Parse USER@HOST.PID:BOOT_TIME. If can't parse, return -1. */ - /* The USER is everything before the first @. */ - at = index (lfinfo, '@'); + /* The USER is everything before the last @. */ + at = rindex (lfinfo, '@'); dot = rindex (lfinfo, '.'); if (!at || !dot) { -- cgit v1.2.1 From 483bdbb35b7760344f8889a2ddb72bd68b35b201 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 24 Jul 2007 01:06:39 +0000 Subject: (cvs-temp-buffer): Disable undo in temp buffers. --- lisp/ChangeLog | 4 ++++ lisp/pcvs.el | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46624565600..370bd3a2e05 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-24 Stefan Monnier + + * pcvs.el (cvs-temp-buffer): Disable undo in temp buffers. + 2007-07-23 Stefan Monnier * ses.el (ses-cleanup): Prevent Emacs from spuriously checking if the diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 12ad6f5e2a0..50cad7e7c14 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -396,7 +396,9 @@ from the current buffer." (set (make-local-variable 'cvs-buffer) cvs-buf) ;;(cvs-minor-mode 1) (let ((lbd list-buffers-directory)) - (if (fboundp mode) (funcall mode) (fundamental-mode)) + (if (fboundp mode) (funcall mode) + (fundamental-mode) + (buffer-disable-undo)) (when lbd (set (make-local-variable 'list-buffers-directory) lbd))) (cvs-minor-mode 1) ;;(set (make-local-variable 'cvs-buffer) cvs-buf) -- cgit v1.2.1 From f931ce84da6a9515dc99f88beb0de3a4138cc1cd Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 24 Jul 2007 01:22:24 +0000 Subject: Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 237-238) - Update from CVS 2007-07-21 Reiner Steib * lisp/gnus/mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc string. 2007-07-16 Katsumi Yamaoka * lisp/gnus/gnus-srvr.el (gnus-server-font-lock-keywords): Quote faces. Revision: emacs@sv.gnu.org/emacs--rel--22--patch-69 --- lisp/gnus/ChangeLog | 9 +++++++++ lisp/gnus/gnus-srvr.el | 10 +++++----- lisp/gnus/mm-uu.el | 5 ++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5e45df2e902..6fd7a1056df 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2007-07-21 Reiner Steib + + * mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc + string. + +2007-07-16 Katsumi Yamaoka + + * gnus-srvr.el (gnus-server-font-lock-keywords): Quote faces. + 2007-07-13 Katsumi Yamaoka * gnus-srvr.el (gnus-server-agent-face, gnus-server-opened-face) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 0d5443f576c..21c99749804 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -215,11 +215,11 @@ If nil, a faster, but more primitive, buffer is used instead." (put 'gnus-server-offline-face 'face-alias 'gnus-server-offline) (defvar gnus-server-font-lock-keywords - '(("(\\(agent\\))" 1 gnus-server-agent) - ("(\\(opened\\))" 1 gnus-server-opened) - ("(\\(closed\\))" 1 gnus-server-closed) - ("(\\(offline\\))" 1 gnus-server-offline) - ("(\\(denied\\))" 1 gnus-server-denied))) + '(("(\\(agent\\))" 1 'gnus-server-agent) + ("(\\(opened\\))" 1 'gnus-server-opened) + ("(\\(closed\\))" 1 'gnus-server-closed) + ("(\\(offline\\))" 1 'gnus-server-offline) + ("(\\(denied\\))" 1 'gnus-server-denied))) (defun gnus-server-mode () "Major mode for listing and editing servers. diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 26eae64777f..acd39c8dfa1 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -162,7 +162,10 @@ This can be either \"inline\" or \"attachment\".") Each element consist of the following entries: label, start-regexp, end-regexp, extract-function, test-function. -After modifying this list you must run \\[mm-uu-configure].") +After modifying this list you must run \\[mm-uu-configure]. + +You can disable elements from this list by customizing +`mm-uu-configure-list'.") (defcustom mm-uu-configure-list '((shar . disabled)) "A list of mm-uu configuration. -- cgit v1.2.1