Ben Key | 7 Nov 05:05 2002
Picon

Fix for Emacs Crash

The following patch fixes a bug I experienced when running a build of GNU
Emacs I made on Windows XP SP1 on Windows 2000 SP2.  The crash occurred when
starting Emacs.

<patch>
--- _21.3/src/w32menu.c	2002-08-05 12:33:44.000000000 -0400
+++ 21.3/src/w32menu.c	2002-11-06 23:01:11.000000000 -0500
 <at>  <at>  -2215,9 +2215,11  <at>  <at> 
 	      info.fState = wv->selected ? MFS_CHECKED : MFS_UNCHECKED;
 	    }

-	  set_menu_item_info (menu,
-			      item != NULL ? (UINT) item : (UINT) wv->call_data,
-			      FALSE, &info);
+    set_menu_item_info (
+        menu,
+        item != NULL ? (UINT) item : (UINT) wv->call_data,
+        item != NULL ? FALSE : TRUE,
+        &info);
 	}
     }
   return return_value;
</patch>

The logic behind this patch is as follows:
* The documentation of SetMenuItemInfo from the MSDN Library is as follows:
  SetMenuItemInfo
  The SetMenuItemInfo function changes information about a menu item.

  BOOL SetMenuItemInfo(
(Continue reading)

Ben Key | 7 Nov 06:12 2002
Picon

preliminary patch for emacsclient.c

As requested, here is a patch that incorporates the changes I have made so
far to emacsclient.c.  These changes have not been fully tested since I have
not been able to get server-start to work.

Attachment (21_3-emacsclient.c.diff): application/octet-stream, 30 KiB
Jason Rumney | 7 Nov 20:47 2002
Picon

Re: Fix for Emacs Crash

"Ben Key" <Bkey1 <at> tampabay.rr.com> writes:

> +    set_menu_item_info (
> +        menu,
> +        item != NULL ? (UINT) item : (UINT) wv->call_data,
> +        item != NULL ? FALSE : TRUE,
> +        &info);

> * I interpreted the line
>   item != NULL ? (UINT) item : (UINT) wv->call_data,
> to mean if item is not NULL, use the specified menu identifier, otherwise
> use the position specified by the call_data member of the wv structure.

I don't think call_data specifies a position, but it may be by chance
that things work correctly in many cases where item == NULL by
assuming it does.

You will have to figure out what wv->call_data and item represent by
studying the rest of the code. My memory is sketchy, but I think that
item can be NULL for menu titles and separator lines. In the title
case, wv->call_data might be NULL as well, so your modified code does
the right thing even though the assumptions behind it are wrong,
since titles are at position 0. But I am not sure what happens in the
separator case.

> * Based upon this interpretation, passing SetMenuItemInfo a value of FALSE
> for the fByPosition parameter unconditionally is obviously incorrect.
> Instead fByPosition should only be FALSE if item is non NULL.

I think this part of your interpretation is correct.
(Continue reading)

Stefan Monnier | 7 Nov 21:28 2002
Picon

Re: Fix for Emacs Crash

> > +        item != NULL ? FALSE : TRUE,

Aka          item == NULL

and in most cases, this is also equivalent to just `item'.

	Stefan
Guido Classen | 12 Nov 23:21 2002
Picon

Suggestion: minor mode for editing files in MS-DOS codepage

Sometimes I must work with old files created under MS-DOS which have the
propritary IBM codepage 850 encoding (for most European languages).
These files have umlauts and accented characters at different places than
the iso-lat1 charset, used by NT-Emacs and GNU-Emacs on UNIX.

After a lot of tries I've figured how the coding systems and codepages
on Emacs work. It seems the will only work if the Emacs buffer is in
multibyte mode. My Emacs runs only in unibyte mode at default.

I thought it would be cool if emacs automatically selects the appropriate
coding-system on opening such as file. The coding: section of Local
Variable seems to work only in multibyte mode so it can't be done
with it.

Therefor I've create a simple minor-mode which switches the buffer to
multibyte and reverts the file. This mode can be selected in the Local
Variables section like this: -*- mode: text; mode: msdos-enc; -*-

If there is a simpler / smarter way to archive let me now. Maybe it could
derived to a more general concept, which supports other kind of files
(mac?).

Here my source file it can be include by autoload or require in .emacs
like this

(autoload 'msdos-enc-mode "path/dos-enc.el"
           "view file in current buffer as MS-DOS Extended ASCII")

(autoload 'find-msdos-file "path/dos-enc.el"
           "Find (visit) file as MS-DOS Extended ASCII")
(Continue reading)

Kevin Ryde | 16 Nov 00:20 2002
Picon
Picon

makeinfo-info.el - use Info-mode with makeinfo-buffer

When editing a texinfo document I like to regularly preview the result
in info-mode, to check the formatting and to re-read for clarity,
accuracy etc.  The bit of code below gets makeinfo-buffer to show its
output in Info-mode, rather than a raw buffer.

Attachment (makeinfo-info.el): application/emacs-lisp, 5122 bytes
Thien-Thi Nguyen | 16 Nov 01:37 2002

gnugo.el 1.15

greetings earthlings,

please find below gnugo.el 1.15, rewritten to use the Go Text Protocol
supported by GNU Go.  i'm posting this here to get some feedback before
contributing it to the gnugo project (they have papers from me already).

users of a previous release of gnugo.el will notice less clutter and
(unintentional ;-) jitter as well as a new customization var.  a code
enhancement opportunity lies in the scoring method, which passes through
to gtp command `estimate_score' currently -- suggestions welcome.

dear RMS: i have procrastinated mightily on the variable-width fonts
support, but at least you can see how it is i love monospace so much...

thi

____________________________________________________________
;;; ID: gnugo.el,v 1.15 2002/11/16 00:26:37 ttn Exp
;;;
;;; Copyright (C) 1999, 2000, 2002 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.

;;; Description: Run GNU Go in a buffer.

;;; Commentary:

;; This is an interface to GNU Go using the Go Text Protocol.  Interaction
;; with the gnugo subprocess is synchronous except for `gnugo-get-move'.  This
;; means you can use Emacs to do other things while gnugo is thinking about
(Continue reading)

Thien-Thi Nguyen | 16 Nov 23:13 2002

gnugo.el 1.18

docstrings and other small cleanup.

thi

_________________________________________________________
;;; ID: gnugo.el,v 1.18 2002/11/16 22:02:03 ttn Exp
;;;
;;; Copyright (C) 1999, 2000, 2002 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.

;;; Description: Run GNU Go in a buffer.

;;; Commentary:

;; This is an interface to GNU Go using the Go Text Protocol.  Interaction
;; with the gnugo subprocess is synchronous except for `gnugo-get-move'.  This
;; means you can use Emacs to do other things while gnugo is thinking about
;; its move.  (Actually, all interaction with the subprocess is inhibited
;; during thinking time -- really, trying to distract your opponent is poor
;; sportsmanship. :-)
;;
;; Customization is presently limited to `gnugo-animation-string', q.v.
;;
;; This code was tested with Emacs 20.7 on a monochrome 80x24 terminal.

;;; Code:

(require 'cl)                           ; use the source luke!

(Continue reading)

Stephen Berman | 27 Nov 00:39 2002
Picon

todo-mode revisions and extensions

The other day on gnu.emacs.help Mark Mysted asked about functionality
for manipulating completed todo items in todo-mode.  Last Spring I
posted a large patch for todo-mode.el to gnu.emacs.bug, which fixed a
number of small bugs in the todo-mode.el included with Emacs 21.2.1
and also added quite a bit of new functionality, some of which seems
to address concerns expressed by Mysted.  Prompted by his question, I
take this opportunity to post the latest version of my revisions and
extensions to todo-mode.el, now just as the source file (which I call
todo-mode-srb.el for development purposes, but it should be installed
and loaded as todo-mode.el), instead of the large diff I posted to
gnu.emacs.bug.  If you want to see just what I changed and added, run
ediff on this file and the todo-mode.el included with Emacs.  I hope
you find this useful and welcome any feedback.

--Steve Berman


;;; todo-mode.el --- major mode for editing TODO list files

;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.

;; Author: Oliver Seidel <os10000 <at> seidel-space.de>
;;   [Not clear the above works, July 2000]
;; Created: 2 Aug 1997
;; Partly revised and extended by Steve Berman <steve <at> ims.uni-stuttgart.de>
;; Version: $Id: todo-mode-srb.el,v 1.21 2002/11/26 21:04:04 steve Exp $
;; Keywords: calendar, todo

;; This file [with revisions and extensions] is [not] part of GNU Emacs.

(Continue reading)

Nicolas Rist | 29 Nov 13:46 2002
Picon

only-one-capital.el 1.2

Hi, this my first package, thank's for comments and bugs

;; THis file defines `only-one-capital' minor mode,
;; that correct the text, when a too long pressure
;; of your finger on the 'shift' key produce
;; two capitals instead one, like in 'THis'

;; It doesn't care of you're at the beginning of a word,
;; but only if the configuration "CCc" comes
;; from three successive typing, without
;; any action or pause between them.

;; IT is possible to customize behaviour with two letters
;; upcased words, like 'IT' in this sentence (Interruptions
;; can be annoying when typing a text in capital.)
;; It's possible always to be asked, never (for change
;; or no change), to have the standard behaviour,
;; to be automatically change except if the previous word
;; is in capital (in this case, asking), to be always asked
;; except if if the previous word  is in capital
;; (in this case, just beep and advise).
;; (Meaby a capslock test would be useful, but I don't know
;; how to do it).

;; You can be asked before any changement, by customizing
;; `only-one-capital-automatic' to 'Ask'.
;; (in the minibuffer or in a popup, as you want,
;; but you see better the question in a popup).

;; The asking comes up you do another command as typing
(Continue reading)


Gmane