* asm-mode patch to allow per-file comment character setting from file locals @ 2006-06-09 12:00 Alastair Houghton 2006-06-11 21:20 ` Stefan Monnier 2006-06-13 12:19 ` Masatake YAMATO 0 siblings, 2 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-09 12:00 UTC (permalink / raw) Hi there, Here's a short patch to asm-mode.el that I use so that I can easily vary the comment style used for assembly language files on a per-file basis. This is particularly useful on Mac OS X, where the Intel and PowerPC versions of the system assembler use different comment characters (I believe the PowerPC version actually accepts both ';' and '#', but the Intel one certainly requires '#'). An example of its use: ### ### Local Variables: ### asm-comment-char: ?\# ### End: ### Here's the patch: --- asm-mode.el.prev 2006-06-09 12:26:09.000000000 +0100 +++ asm-mode.el 2006-06-09 12:54:01.000000000 +0100 @@ -59,6 +59,14 @@ "*The comment-start character assumed by Asm mode." :type 'character :group 'asm) +(make-variable-buffer-local 'asm-comment-char) +(put 'asm-comment-char 'safe-local-variable t) + +(defvar asm-current-comment-char nil + "Holds the current comment-start character in use in this buffer.") +(make-variable-buffer-local 'asm-current-comment-char) + +(add-hook 'find-file-hook (lambda () (asm-set-comment-char asm- comment-char))) (defvar asm-mode-syntax-table (let ((st (make-syntax-table))) @@ -134,12 +142,9 @@ ;; Make our own local child of asm-mode-map ;; so we can define our own comment character. (use-local-map (nconc (make-sparse-keymap) asm-mode-map)) - (local-set-key (vector asm-comment-char) 'asm-comment) + (asm-set-comment-char asm-comment-char) (set-syntax-table (make-syntax-table asm-mode-syntax-table)) - (modify-syntax-entry asm-comment-char "<") - (make-local-variable 'comment-start) - (setq comment-start (string asm-comment-char)) (make-local-variable 'comment-add) (setq comment-add 1) (make-local-variable 'comment-start-skip) @@ -151,6 +156,22 @@ (setq fill-prefix "\t") (run-mode-hooks 'asm-mode-hook)) +(defun asm-set-comment-char (newch) + "Set the comment character for the current buffer" + (interactive "c") + (when asm-current-comment-char + (local-unset-key (vector asm-current-comment-char)) + (modify-syntax-entry asm-current-comment-char + (with-syntax-table asm-mode-syntax-table + (string (char-syntax asm-current-comment- char))))) + (setq asm-comment-char newch) + (setq asm-current-comment-char newch) + (local-set-key (vector asm-comment-char) 'asm-comment) + (modify-syntax-entry asm-comment-char "<") + (setq comment-start (string asm-comment-char)) + (when font-lock-mode + (font-lock-fontify-buffer))) + (defun asm-indent-line () "Auto-indent the current line." (interactive) Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-09 12:00 asm-mode patch to allow per-file comment character setting from file locals Alastair Houghton @ 2006-06-11 21:20 ` Stefan Monnier 2006-06-12 9:46 ` Alastair Houghton 2006-06-13 12:19 ` Masatake YAMATO 1 sibling, 1 reply; 37+ messages in thread From: Stefan Monnier @ 2006-06-11 21:20 UTC (permalink / raw) Cc: emacs-devel I don't have time to look in detail at the patch, but here are some comments: > +(make-variable-buffer-local 'asm-comment-char) Please don't do that. USe make-local-variable where necessary instead. > +(put 'asm-comment-char 'safe-local-variable t) Use an actual function instead rather than just t. Stefan ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-11 21:20 ` Stefan Monnier @ 2006-06-12 9:46 ` Alastair Houghton 2006-06-12 13:12 ` David Kastrup 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-12 9:46 UTC (permalink / raw) Cc: emacs-devel On 11 Jun 2006, at 22:20, Stefan Monnier wrote: > I don't have time to look in detail at the patch, but here are some > comments: > >> +(make-variable-buffer-local 'asm-comment-char) > > Please don't do that. USe make-local-variable where necessary > instead. The reason I chose to use make-variable-buffer-local is that I want to be able to set it from a file local variables block (either the - *- version at the top, or the version at the bottom of my assembler files). Is there a way to ensure that it's buffer local before that point without using make-variable-buffer-local? >> +(put 'asm-comment-char 'safe-local-variable t) > > Use an actual function instead rather than just t. I'm guessing you think it should check the type for int or (in XEmacs case) char. Fair comment. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-12 9:46 ` Alastair Houghton @ 2006-06-12 13:12 ` David Kastrup 2006-06-12 15:02 ` Alastair Houghton 0 siblings, 1 reply; 37+ messages in thread From: David Kastrup @ 2006-06-12 13:12 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > On 11 Jun 2006, at 22:20, Stefan Monnier wrote: > >> I don't have time to look in detail at the patch, but here are some >> comments: >> >>> +(make-variable-buffer-local 'asm-comment-char) >> >> Please don't do that. USe make-local-variable where necessary >> instead. > > The reason I chose to use make-variable-buffer-local is that I want > to be able to set it from a file local variables block (either the - > *- version at the top, or the version at the bottom of my assembler > files). Files set from a file local variables block are made buffer-local, anyway. Perhaps reading the documentation will help. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-12 13:12 ` David Kastrup @ 2006-06-12 15:02 ` Alastair Houghton 2006-06-12 22:58 ` David Kastrup 2006-06-12 22:58 ` asm-mode patch to allow per-file comment character setting from file locals Thien-Thi Nguyen 0 siblings, 2 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-12 15:02 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel On 12 Jun 2006, at 14:12, David Kastrup wrote: > Files set from a file local variables block are made buffer-local, > anyway. Which isn't stated in the Elisp info documentation (which I *did* read), though I do see now that it says that in the Emacs info file (which I only skimmed), and it certainly makes sense that it should work that way. > Perhaps reading the documentation will help. I'm happy to admit that I missed that part of the documentation, though I'm don't appreciate the undertone of cheekiness in your last remark, particularly not from someone with a gnu.org e-mail address. Maybe it wasn't intended that way, but that's how it came across. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-12 15:02 ` Alastair Houghton @ 2006-06-12 22:58 ` David Kastrup 2006-06-13 10:36 ` Alastair Houghton 2006-06-12 22:58 ` asm-mode patch to allow per-file comment character setting from file locals Thien-Thi Nguyen 1 sibling, 1 reply; 37+ messages in thread From: David Kastrup @ 2006-06-12 22:58 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > On 12 Jun 2006, at 14:12, David Kastrup wrote: > >> Files set from a file local variables block are made buffer-local, >> anyway. > > Which isn't stated in the Elisp info documentation (which I *did* > read), File local variable blocks are not documented in the Elisp manual at all. They are a user-level feature. > though I do see now that it says that in the Emacs info file (which > I only skimmed), and it certainly makes sense that it should work > that way. > >> Perhaps reading the documentation will help. > > I'm happy to admit that I missed that part of the documentation, > though I'm don't appreciate the undertone of cheekiness in your last > remark, particularly not from someone with a gnu.org e-mail address. I'll leave replying to you to others in future. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-12 22:58 ` David Kastrup @ 2006-06-13 10:36 ` Alastair Houghton 2006-06-13 17:56 ` Eli Zaretskii 2006-06-14 5:11 ` asm-mode patch to allow per-file comment character setting from file locals Miles Bader 0 siblings, 2 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-13 10:36 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel On 12 Jun 2006, at 23:58, David Kastrup wrote: > Alastair Houghton <alastair@alastairs-place.net> writes: > >> On 12 Jun 2006, at 14:12, David Kastrup wrote: >> >>> Files set from a file local variables block are made buffer-local, >>> anyway. >> >> Which isn't stated in the Elisp info documentation (which I *did* >> read), > > File local variable blocks are not documented in the Elisp manual at > all. They are a user-level feature. *My* copy of the Elisp manual has a node entitled "File Local Variables". It seems to me that that should be the documentation for file local variables from an Elisp perspective. > I'll leave replying to you to others in future. That's your prerogative, of course. On 12 Jun 2006, at 23:58, Thien-Thi Nguyen wrote: > Alastair Houghton <alastair@alastairs-place.net> writes: > >> I'm happy to admit that I missed that part of the documentation, >> though I'm don't appreciate the undertone of cheekiness in your >> last remark, particularly not from someone with a gnu.org e-mail >> address. Maybe it wasn't intended that way, but that's how it >> came across. > > what do you expect from people w/ a gnu.org e-mail address? what > does that expectation have to do w/ not reading the docs properly? What I expect is that people with gnu.org addresses (who represent the FSF, right?) should be being polite to people who are trying to contribute to an FSF project. If I'm wrong or have misunderstood something, or have missed something in the docs, I don't mind being told that, but I also don't see why I should put up with remarks I perceive as cheeky given that I'm giving my time (and/or my employer's time) for free. I don't think that's an unreasonable expectation. If it was not a gnu.org address, that's different because you don't have any control over them and they don't represent the FSF. (BTW, I'm not certain that David's remark was intended to be cheeky, but equally I'm not altogether certain that it wasn't. I wasn't really planning on starting a discussion about it either.) > if the docs are unclear to you in some way, please explain how so. I think the Elisp manual's node (the larger of the two nodes that discuss file locals) should explicitly state that they are automatically made buffer local. If it had done, I'd probably have seen it. The node in the Emacs manual is very short and looks like a menu node with an introduction, rather than actual documentation per se. Don't misunderstand; the fault here is mine, I should have read it more carefully. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-13 10:36 ` Alastair Houghton @ 2006-06-13 17:56 ` Eli Zaretskii 2006-06-13 19:27 ` [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton 2006-06-14 5:11 ` asm-mode patch to allow per-file comment character setting from file locals Miles Bader 1 sibling, 1 reply; 37+ messages in thread From: Eli Zaretskii @ 2006-06-13 17:56 UTC (permalink / raw) Cc: emacs-devel > From: Alastair Houghton <alastair@alastairs-place.net> > Date: Tue, 13 Jun 2006 11:36:29 +0100 > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org > > >>> Files set from a file local variables block are made buffer-local, > >>> anyway. > >> > >> Which isn't stated in the Elisp info documentation (which I *did* > >> read), > > > > File local variable blocks are not documented in the Elisp manual at > > all. They are a user-level feature. > > *My* copy of the Elisp manual has a node entitled "File Local Variables". Which says, as its very first paragraph: This section describes the functions and variables that affect processing of file local variables. *Note (emacs)File variables, for basic information about file local variables. So this section describes the _functions_and_variables_ related to local vars _processing_, not the user-level information for which you are referred to the user's manual. And the user manual says, in the very first paragraph of the node referenced above: Visiting the file checks for local variable specifications; it automatically makes these variables local to the buffer, and sets them to the values specified in the file. Do we agree now that the information you were looking for is in the docs? If you think something in these texts is unclear or missing, please tell what that is, thanks. > If I'm wrong or have misunderstood something, or have missed > something in the docs, I don't mind being told that, but I also > don't see why I should put up with remarks I perceive as cheeky > given that I'm giving my time (and/or my employer's time) for free. > I don't think that's an unreasonable expectation. I think you should assume a possible misunderstanding, before you actually decide that a remark that sounds cheeky to you is indeed cheeky. Please don't forget that for most of the people here (including David and myself) English is not their first language. Fine nuances of English are not always clear to us. And you are not the only one who gives their time for free. All the rest of us, including, but not limited to, those with gnu.org addresses, are also volunteers, answering questions and helping maintain Emacs on their own free time. So the politeness and good manners are equally reasonably expected on both sides. > If it was not a gnu.org address, that's different because you don't > have any control over them and they don't represent the FSF. People with gnu.org address don't represent the FSF in any way, they just happen to have accounts on gnu.org machines because they do work for the GNU project. > I think the Elisp manual's node (the larger of the two nodes that > discuss file locals) should explicitly state that they are > automatically made buffer local. If it had done, I'd probably have > seen it. I'll leave it to Richard to decide whether this information should be actually added to the ELisp manual, but please understand that we cannot repeat in the ELisp manual everything that the user manual says, as it will inflate the ELisp manual too much. That's what cross-references are for--to say things in one place, then point there in several related ones. > The node in the Emacs manual is very short and looks like a menu > node with an introduction, rather than actual documentation per se. See the citation above: what you were looking for is right there before the menu, I think. ^ permalink raw reply [flat|nested] 37+ messages in thread
* [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-13 17:56 ` Eli Zaretskii @ 2006-06-13 19:27 ` Alastair Houghton 2006-06-13 22:21 ` Thien-Thi Nguyen 2006-06-14 3:30 ` Eli Zaretskii 0 siblings, 2 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-13 19:27 UTC (permalink / raw) Cc: emacs-devel On 13 Jun 2006, at 18:56, Eli Zaretskii wrote: > Do we agree now that the information you were looking for is in the > docs? If you think something in these texts is unclear or missing, > please tell what that is, thanks. There was never any dispute that the information was in the documentation. Nor was there ever any dispute that the reason I didn't know about it was that I hadn't read it carefully enough. > I think you should assume a possible misunderstanding, before you > actually decide that a remark that sounds cheeky to you is indeed > cheeky. Please don't forget that for most of the people here > (including David and myself) English is not their first language. > Fine nuances of English are not always clear to us. If you read my original reply to David Kastrup, or the more recent reply to Thien-Thi Nguyen, you will find that I am well aware that it may not have been intentional. I do have a sneaking suspicion that it *was* how it was intended to come across though (as I'm well aware that it's frustrating that people don't read documentation); but even if it wasn't, it would only have taken a second for David to reply that he hadn't meant it that way and that he was sorry if that was how I'd taken it. > And you are not the only one who gives their time for free. I'm well aware of that, and I'm equally well aware that there are others who donate much more of their spare time than I do. > All the rest of us, including, but not limited to, those with gnu.org > addresses, are also volunteers, answering questions and helping > maintain Emacs on their own free time. So the politeness and good > manners are equally reasonably expected on both sides. If you can find an instance where I haven't been polite, then I will happily apologise for it. >> If it was not a gnu.org address, that's different because you don't >> have any control over them and they don't represent the FSF. > > People with gnu.org address don't represent the FSF in any way, they > just happen to have accounts on gnu.org machines because they do work > for the GNU project. People with gnu.org addresses represent the FSF every time they use that address, in the same sense that people wearing a uniform represent the organisation to which the uniform belongs. That doesn't mean that they *speak for* the FSF, of course, in the same way that most individual members of (say) the Salvation Army do not speak for *their* organisation. The fact remains, though, that they do *represent* that organisation to the wider world. Anyway, to be clear, I'm really not interested in debating this, and I'm certain it's off-topic for the list as well. All I wanted to do was submit my patch. If you have a technical problem with it, then by all means comment (though please look at the most recent version, rather than the one in the first message in this thread). Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-13 19:27 ` [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton @ 2006-06-13 22:21 ` Thien-Thi Nguyen 2006-06-14 11:25 ` Alastair Houghton 2006-06-14 3:30 ` Eli Zaretskii 1 sibling, 1 reply; 37+ messages in thread From: Thien-Thi Nguyen @ 2006-06-13 22:21 UTC (permalink / raw) Cc: emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > I do have a sneaking suspicion that [...] > If you can find an instance where I haven't been polite, > then I will happily apologise for it. there is no real need for politeness, nor apologies. likewise, there is no real need for sneaking suspicion. all of these can be misrepresented, misinterpreted and mishandled. so by all means, make the program precise, but don't forget to leave slack for the programmers (at least, until you get to know them personally :-). for example, you may think i "represent" FSF saying these things, but i don't mind considering that over time your conception of the association between a thing and its name(s) will mature. in this way, i cut you slack, personally (FWIW, YMMV, HAND, IMHO :-). the real need is for programmers who contribute to emacs to get the paperwork done, if the emacs maintainer (RMS) thinks the contribution is good, preferably in a manner that reduces administrative work in the future. to make evaluating the patch easier, please repost the latest version using "diff -c". thi ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-13 22:21 ` Thien-Thi Nguyen @ 2006-06-14 11:25 ` Alastair Houghton 0 siblings, 0 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 11:25 UTC (permalink / raw) Cc: emacs-devel On 13 Jun 2006, at 23:21, Thien-Thi Nguyen wrote: > Alastair Houghton <alastair@alastairs-place.net> writes: > >> I do have a sneaking suspicion that [...] > >> If you can find an instance where I haven't been polite, >> then I will happily apologise for it. > > there is no real need for politeness, nor apologies. > likewise, there is no real need for sneaking suspicion. Well I certainly think that people should be polite to one another. However, from the perspective of Emacs, I suppose you are right. > for example, you may think i "represent" FSF saying these > things, Not quite in the sense you seem to have understood, but then you are not asking for an explanation or arguing about it, and I (like you, it seems) would rather get back to the issue of the patch. > to make evaluating the patch easier, please repost the > latest version using "diff -c". Of course. I've just done so. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-13 19:27 ` [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton 2006-06-13 22:21 ` Thien-Thi Nguyen @ 2006-06-14 3:30 ` Eli Zaretskii 2006-06-14 10:53 ` Alastair Houghton 1 sibling, 1 reply; 37+ messages in thread From: Eli Zaretskii @ 2006-06-14 3:30 UTC (permalink / raw) Cc: emacs-devel > Cc: emacs-devel@gnu.org > From: Alastair Houghton <alastair@alastairs-place.net> > Date: Tue, 13 Jun 2006 20:27:27 +0100 > > > All the rest of us, including, but not limited to, those with gnu.org > > addresses, are also volunteers, answering questions and helping > > maintain Emacs on their own free time. So the politeness and good > > manners are equally reasonably expected on both sides. > > If you can find an instance where I haven't been polite, then I will > happily apologise for it. Your reaction to David's response strikes me as impolite, because it interpreted a perfectly technical response as having a non-technical agenda, and pounced on him. > >> If it was not a gnu.org address, that's different because you don't > >> have any control over them and they don't represent the FSF. > > > > People with gnu.org address don't represent the FSF in any way, they > > just happen to have accounts on gnu.org machines because they do work > > for the GNU project. > > People with gnu.org addresses represent the FSF every time they use > that address, in the same sense that people wearing a uniform > represent the organisation to which the uniform belongs. You are wrong, and your analogy is wrong. > Anyway, to be clear, I'm really not interested in debating this Well, you started it to begin with. ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-14 3:30 ` Eli Zaretskii @ 2006-06-14 10:53 ` Alastair Houghton 2006-06-14 12:04 ` [OT] Netiquette David Kastrup 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 10:53 UTC (permalink / raw) Cc: emacs-devel On 14 Jun 2006, at 04:30, Eli Zaretskii wrote: > Your reaction to David's response strikes me as impolite, because it > interpreted a perfectly technical response as having a non-technical > agenda, and pounced on him. It wasn't a "perfectly technical response". Only the first sentence was technical. >> Anyway, to be clear, I'm really not interested in debating this > > Well, you started it to begin with. No, I didn't. Thien-Thi Nguyen didn't either; his question (about what I felt I expected from people with gnu.org addresses) was perfectly reasonable given what I'd written. *You* "started it". Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 10:53 ` Alastair Houghton @ 2006-06-14 12:04 ` David Kastrup 2006-06-14 15:31 ` Alastair Houghton 0 siblings, 1 reply; 37+ messages in thread From: David Kastrup @ 2006-06-14 12:04 UTC (permalink / raw) Cc: Eli Zaretskii, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > On 14 Jun 2006, at 04:30, Eli Zaretskii wrote: > >> Your reaction to David's response strikes me as impolite, because it >> interpreted a perfectly technical response as having a non-technical >> agenda, and pounced on him. > > It wasn't a "perfectly technical response". Only the first sentence > was technical. The whole reply (excluding quotes from your post) was Files set from a file local variables block are made buffer-local, anyway. Perhaps reading the documentation will help. So it consisted of two sentences. The first, longer sentence explained your mistake. The second, shorter one, pointed out that this was supposed to be covered in the documentation. Both sentences were intended to help you deal with your problem. >>> Anyway, to be clear, I'm really not interested in debating this >> >> Well, you started it to begin with. > > No, I didn't. Yes, you did, and by now it is reflecting badly on the attitude of people with an alastairs-place.net mail address. I suggest that you drop your diatribe which nobody will miss and instead try concentrating on the technical merits and issues of your patch. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 12:04 ` [OT] Netiquette David Kastrup @ 2006-06-14 15:31 ` Alastair Houghton 2006-06-14 15:43 ` Sam Steingold ` (3 more replies) 0 siblings, 4 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 15:31 UTC (permalink / raw) Cc: emacs-devel On 14 Jun 2006, at 13:04, David Kastrup wrote: >>>> Anyway, to be clear, I'm really not interested in debating this >>> >>> Well, you started it to begin with. >> >> No, I didn't. > > Yes, you did, I most certainly did not. All *I* did was complain that I didn't like your remark; I didn't invite and don't care for a discussion on the subject. > I suggest that you drop your diatribe which nobody will miss and > instead try concentrating on the technical merits and issues of your > patch. Which is what I'd been saying from the beginning (though let's be clear: it isn't *my* diatribe; all I did was complain that I found your reply cheeky, and I even made clear that I realised it might not have been deliberate... all the subsequent pointless argument has been started and perpetuated by gnu.org people.) At this point I'm thoroughly fed-up, so: 1. I won't be contributing to Emacs in future. Instead, I'll either keep my changes to myself or I'll go back to XEmacs. 2. If I see *any* further email on this topic, I will withdraw my current patch and won't be signing any copyright assignment forms. E- mail about the patch itself is, of course, fine. Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 15:31 ` Alastair Houghton @ 2006-06-14 15:43 ` Sam Steingold 2006-06-14 16:28 ` Alastair Houghton 2006-06-14 16:17 ` Chong Yidong ` (2 subsequent siblings) 3 siblings, 1 reply; 37+ messages in thread From: Sam Steingold @ 2006-06-14 15:43 UTC (permalink / raw) > * Alastair Houghton <nynfgnve@nynfgnvef-cynpr.arg> [2006-06-14 16:31:03 +0100]: > > On 14 Jun 2006, at 13:04, David Kastrup wrote: > >>>>> Anyway, to be clear, I'm really not interested in debating this >>>> Well, you started it to begin with. >>> No, I didn't. >> Yes, you did, > > I most certainly did not. All *I* did was complain that I didn't like > your remark; I didn't invite and don't care for a discussion on the > subject. this constitutes a start in the debate of netiquette, IMHO. FWIW, I agree that whatever people do reflects on their uniform (including e-mail domain), but I see nothing wrong in telling someone that the answer to his question is covered in the manual, except that I prefer to see a URL next to the note to RTFM. > At this point I'm thoroughly fed-up, so: > > 1. I won't be contributing to Emacs in future. Instead, I'll either > keep my changes to myself or I'll go back to XEmacs. > > 2. If I see *any* further email on this topic, I will withdraw my > current patch and won't be signing any copyright assignment forms. E- > mail about the patch itself is, of course, fine. I doubt that these kinds of threats will win you any friends here or elsewhere. -- Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux) http://jihadwatch.org http://iris.org.il http://mideasttruth.com http://truepeace.org http://thereligionofpeace.com http://palestinefacts.org Isn't "Microsoft Works" an advertisement lie? ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 15:43 ` Sam Steingold @ 2006-06-14 16:28 ` Alastair Houghton 2006-06-14 16:35 ` Sam Steingold 2006-06-14 18:09 ` Thien-Thi Nguyen 0 siblings, 2 replies; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 16:28 UTC (permalink / raw) Cc: emacs-devel On 14 Jun 2006, at 16:43, Sam Steingold wrote: > I see nothing wrong in telling someone > that the answer to his question is covered in the manual, except > that I > prefer to see a URL next to the note to RTFM. No, there's nothing wrong with telling someone that the answer to a question is covered in the manual. But I didn't ask a question, and that isn't how David worded his reply. I also don't see anything wrong with apologising if you offend someone, but apparently the correct approach is to attack them for taking offence instead, particularly if at the time they're trying to help out with some FOSS package you're working on. >> At this point I'm thoroughly fed-up, so: >> >> 1. I won't be contributing to Emacs in future. Instead, I'll either >> keep my changes to myself or I'll go back to XEmacs. >> >> 2. If I see *any* further email on this topic, I will withdraw my >> current patch and won't be signing any copyright assignment >> forms. E- >> mail about the patch itself is, of course, fine. > > I doubt that these kinds of threats will win you any friends here or > elsewhere. I wasn't after "winning friends", I was after putting an end once and for all to this pointless e-mail conversation. But apparently *you* consider it more important to continue it than you do that someone makes a useful contribution to Emacs. Maybe you thought I was bluffing, but I'm afraid I'm not, so---thanks to you---I'm withdrawing my patch and I won't be signing any copyright forms sent by the FSF. Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 16:28 ` Alastair Houghton @ 2006-06-14 16:35 ` Sam Steingold 2006-06-14 18:09 ` Thien-Thi Nguyen 1 sibling, 0 replies; 37+ messages in thread From: Sam Steingold @ 2006-06-14 16:35 UTC (permalink / raw) Cc: emacs-devel Speaking of netiquette, please fix your newsreader to respect the Mail-Copies-To: never header. I do not appreciate receiving 2 copies of your e-mails. -- Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux) http://iris.org.il http://memri.org http://openvotingconsortium.org http://jihadwatch.org http://camera.org http://thereligionofpeace.com Linux: Telling Microsoft where to go since 1991. ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 16:28 ` Alastair Houghton 2006-06-14 16:35 ` Sam Steingold @ 2006-06-14 18:09 ` Thien-Thi Nguyen 1 sibling, 0 replies; 37+ messages in thread From: Thien-Thi Nguyen @ 2006-06-14 18:09 UTC (permalink / raw) Cc: emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > Maybe you thought I was bluffing, but I'm afraid I'm not, > so---thanks to you---I'm withdrawing my patch and I won't > be signing any copyright forms sent by the FSF. the choice is yours. thanks for posting the patch, anyway. perhaps someone will get ideas from reading it and make useful changes to asm-mode.el in the future. some observations for the next patch, should you have a change of heart: - the function asm-set-comment-char allows for very dynamic comment char. i wonder how useful that would be in practice -- do assembler language files often contain different regions w/ varying comment chars? (i.e., can we get same results w/ asm-mode-hook?) - docstrings conventionally have the grammar style: "Return foo..." instead of "Returns foo...". also, they should mention the function's arguments. - error messages conventionally begin w/ a capital letter. - the need to refontify strikes me as unclean. perhaps this is related to the first point above. see info nodes `(elisp) Tips' and `(elisp) Major Mode' for more information. if you have difficulty w/ that documentation, please start another thread. (i will bow out of this thread now.) thi ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 15:31 ` Alastair Houghton 2006-06-14 15:43 ` Sam Steingold @ 2006-06-14 16:17 ` Chong Yidong 2006-06-14 16:26 ` David Kastrup 2006-06-15 1:58 ` [OT] Netiquette Miles Bader 3 siblings, 0 replies; 37+ messages in thread From: Chong Yidong @ 2006-06-14 16:17 UTC (permalink / raw) Cc: Eli Zaretskii, emacs-devel > At this point I'm thoroughly fed-up, so: > > 1. I won't be contributing to Emacs in future. Instead, I'll either > keep my changes to myself or I'll go back to XEmacs. > > 2. If I see *any* further email on this topic, I will withdraw my > current patch and won't be signing any copyright assignment forms. E- > mail about the patch itself is, of course, fine. I find this remark cheeky, though this may not be the intended effect. (My opinions do not, however, reflect those of stupidchicken.com) ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 15:31 ` Alastair Houghton 2006-06-14 15:43 ` Sam Steingold 2006-06-14 16:17 ` Chong Yidong @ 2006-06-14 16:26 ` David Kastrup 2006-06-14 16:40 ` Alastair Houghton 2006-06-15 1:58 ` [OT] Netiquette Miles Bader 3 siblings, 1 reply; 37+ messages in thread From: David Kastrup @ 2006-06-14 16:26 UTC (permalink / raw) Cc: Eli Zaretskii, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > On 14 Jun 2006, at 13:04, David Kastrup wrote: > >>>>> Anyway, to be clear, I'm really not interested in debating this >>>> >>>> Well, you started it to begin with. >>> >>> No, I didn't. >> >> Yes, you did, > > I most certainly did not. All *I* did was complain that I didn't > like your remark; I didn't invite and don't care for a discussion on > the subject. So if others don't like your remarks and complain, they start a discussion, whereas you do no such thing when doing the same? In particular when lecturing about the moral obligations of people with a gnu.org address, when quite a few of those are hanging out on the list? It does not appear to you that you are asking people to behave differently from what you do yourself? This is a developer list. Developers are not necessarily perfect diplomats, and a lot of technical and design controversies are fought out on the list. I think it unlikely that you'll find a single list participant who will state that he finds all others on the list perfectly pleasant (and I certainly don't do much to improve the record). But the ultimate purpose of this list is to improve Emacs, not improve the other developers. My pointer to the documentation was not very helpful, but I was tired when I posted it, and I remembered that I had read this in the documentation. I did not remember actually where, and I was not in the mood to dig around. If you want to have the last word on this matter, that's fine with me and I'd ask others to leave it to you. It is obvious enough that all that could have been worth saying has been said. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 16:26 ` David Kastrup @ 2006-06-14 16:40 ` Alastair Houghton 2006-06-14 17:32 ` Sam Steingold 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 16:40 UTC (permalink / raw) Cc: Eli Zaretskii, emacs-devel On 14 Jun 2006, at 17:26, David Kastrup wrote: > So if others don't like your remarks and complain, they start a > discussion, whereas you do no such thing when doing the same? I don't recall asking to discuss netiquette. What I do recall is that once upon a time I was interested in submitting a patch. I am not, now. It shouldn't be surprising that if someone complains about something you have said, and then you and others proceed to attack them for complaining, they won't want to work with you. Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 16:40 ` Alastair Houghton @ 2006-06-14 17:32 ` Sam Steingold 2006-06-15 8:30 ` Richard Stallman 0 siblings, 1 reply; 37+ messages in thread From: Sam Steingold @ 2006-06-14 17:32 UTC (permalink / raw) > * Alastair Houghton <nynfgnve@nynfgnvef-cynpr.arg> [2006-06-14 17:40:34 +0100]: > > It shouldn't be surprising that if someone complains about something > you have said, and then you and others proceed to attack them for > complaining, they won't want to work with you. 1. I do not think your complaint was justified. 2. I do not think that you have been "attacked" any more than you "attacked" whoever you were unhappy about. It is unfortunate that the conversation has degenerated into this. -- Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux) http://openvotingconsortium.org http://pmw.org.il http://jihadwatch.org http://truepeace.org http://iris.org.il http://dhimmi.com http://ffii.org Why use Windows, when there are Doors? ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 17:32 ` Sam Steingold @ 2006-06-15 8:30 ` Richard Stallman 2006-06-15 8:57 ` Alastair Houghton 0 siblings, 1 reply; 37+ messages in thread From: Richard Stallman @ 2006-06-15 8:30 UTC (permalink / raw) Cc: emacs-devel > It shouldn't be surprising that if someone complains about something > you have said, and then you and others proceed to attack them for > complaining, they won't want to work with you. David Kastrup's remark was somewhat harsh, harsh enough that he ought not to have said it. Your complaint was justified, as far as that goes. However, what he said wasn't really an attack on you, just somewhat harsh. So I think that, even though you had grounds for a complaint, it would have been wiser for you to let the matter slide. It would likewise have been better, and wiser, if other people had not responded to your complaint by arguing with you. They were right in a limited sense, that you had made a mistaken assumption and thus reached a conclusion that was a little too strong. But that was a side issue, and they should not have argued about it. Some people, after seeing that your feelings were hurt, responded in an aggressive tone. That was a bad thing to do, but I see why they did it. Your statement came across as a demand: "Everyone shut up instantly, or I will refuse to contribute my code." So their response really meant, "I'll prove you can't order me to shut up!" It was foolish to respond that way, but it was almost inevitable that someone would. It seems that both you and others passed up opportunities to let the quarrel end (by not responding). If only people had used those opportunities, we would have had a good outcome. I hope that those who continue contributing to Emacs will learn the lesson not to continue arguments about side issues where someone's feelings have been hurt. Don't take the risk of hurting the person more. Let it drop! ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-15 8:30 ` Richard Stallman @ 2006-06-15 8:57 ` Alastair Houghton 2006-06-16 6:01 ` Richard Stallman 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-15 8:57 UTC (permalink / raw) Cc: sds, emacs-devel On 15 Jun 2006, at 09:30, Richard Stallman wrote: >> It shouldn't be surprising that if someone complains about something >> you have said, and then you and others proceed to attack them for >> complaining, they won't want to work with you. > > David Kastrup's remark was somewhat harsh, harsh enough that he ought > not to have said it. Your complaint was justified, as far as that > goes. > > However, what he said wasn't really an attack on you, just somewhat > harsh. So I think that, even though you had grounds for a complaint, > it would have been wiser for you to let the matter slide. Yes, I think I'd agree with that in hindsight, but it's much easier to say that now. > It seems that both you and others passed up opportunities to let the > quarrel end (by not responding). If only people had used those > opportunities, we would have had a good outcome. Yes, both sides share the guilt to some degree and I for my part am sorry that it happened. It's wasted a lot of time that people could better have spent either working on their job (which is my priority right now) or contributing to Emacs. In light of your reply, I will be happy to sign any copyright assignment form that I do receive. I still feel, sadly, that I'm now much less likely to contribute in future, but who knows; maybe I will change my mind at some point. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-15 8:57 ` Alastair Houghton @ 2006-06-16 6:01 ` Richard Stallman 2006-06-16 18:48 ` asm-mode comment char patch (was: [OT] Netiquette) Alastair Houghton 0 siblings, 1 reply; 37+ messages in thread From: Richard Stallman @ 2006-06-16 6:01 UTC (permalink / raw) Cc: sds, emacs-devel In light of your reply, I will be happy to sign any copyright assignment form that I do receive. Thank you. Did you email that form as I asked? If so, you should receive the papers in a week or so. I think asm-set-comment-char needs to handle nil as an argument meaning no comment character. Interactively, it should provide a way to say "none". ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode comment char patch (was: [OT] Netiquette) 2006-06-16 6:01 ` Richard Stallman @ 2006-06-16 18:48 ` Alastair Houghton 2006-06-17 17:57 ` Richard Stallman 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-16 18:48 UTC (permalink / raw) Cc: emacs-devel On 16 Jun 2006, at 07:01, Richard Stallman wrote: > In light of your reply, I will be happy to sign any copyright > assignment form that I do receive. > > Thank you. Did you email that form as I asked? Yes. > If so, you should receive the papers in a week or so. OK. I'll get them sent back as soon as possible after they arrive. > I think asm-set-comment-char needs to handle nil as an argument > meaning no comment character. Interactively, it should provide a way > to say "none". I'm probably going to be pretty busy until Tuesday of next week with work, so most likely I won't be able to add that feature until then (though I agree, it makes sense that you should be able to specify none as an option). When I do, I'll post a new version of the patch. I had a couple of other suggestions for improvements from Thien-Thi Nguyen that I'll try to incorporate as well. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode comment char patch (was: [OT] Netiquette) 2006-06-16 18:48 ` asm-mode comment char patch (was: [OT] Netiquette) Alastair Houghton @ 2006-06-17 17:57 ` Richard Stallman 0 siblings, 0 replies; 37+ messages in thread From: Richard Stallman @ 2006-06-17 17:57 UTC (permalink / raw) Cc: emacs-devel Happy hacking. ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Netiquette 2006-06-14 15:31 ` Alastair Houghton ` (2 preceding siblings ...) 2006-06-14 16:26 ` David Kastrup @ 2006-06-15 1:58 ` Miles Bader 3 siblings, 0 replies; 37+ messages in thread From: Miles Bader @ 2006-06-15 1:58 UTC (permalink / raw) Cc: Eli Zaretskii, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > Which is what I'd been saying from the beginning (though let's be > clear: it isn't *my* diatribe It seems to have become so though: > 1. I won't be contributing to Emacs in future. Instead, I'll either > keep my changes to myself or I'll go back to XEmacs. > > 2. If I see *any* further email on this topic, I will withdraw my > current patch and won't be signing any copyright assignment forms. E- Yeah, _that's_ a mature response... -Miles -- Would you like fries with that? ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-13 10:36 ` Alastair Houghton 2006-06-13 17:56 ` Eli Zaretskii @ 2006-06-14 5:11 ` Miles Bader 2006-06-14 11:18 ` [OT] Whether those with gnu.org addresses in any way represent FSF (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton 1 sibling, 1 reply; 37+ messages in thread From: Miles Bader @ 2006-06-14 5:11 UTC (permalink / raw) Cc: Thien-Thi Nguyen, Stefan Monnier, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > What I expect is that people with gnu.org addresses (who represent the > FSF, right?) Not really, no. You seem to be thinking of GNU as some sort of business -- businesses often maintain fairly close control over who has access to their systems and for what purposes they use them, and usually try to present a unified public front. GNU is not like that. Rather maybe think of it like a FOO.edu address. -Miles -- "An atheist doesn't have to be someone who thinks he has a proof that there can't be a god. He only has to be someone who believes that the evidence on the God question is at a similar level to the evidence on the werewolf question." [John McCarthy] ^ permalink raw reply [flat|nested] 37+ messages in thread
* [OT] Whether those with gnu.org addresses in any way represent FSF (was: Re: asm-mode patch to allow per-file comment character setting from file locals) 2006-06-14 5:11 ` asm-mode patch to allow per-file comment character setting from file locals Miles Bader @ 2006-06-14 11:18 ` Alastair Houghton 2006-06-14 12:29 ` [OT] Whether those with gnu.org addresses in any way represent FSF Miles Bader 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 11:18 UTC (permalink / raw) Cc: emacs-devel On 14 Jun 2006, at 06:11, Miles Bader wrote: > Alastair Houghton <alastair@alastairs-place.net> writes: >> What I expect is that people with gnu.org addresses (who represent >> the >> FSF, right?) > > Not really, no. > > You seem to be thinking of GNU as some sort of business -- businesses > often maintain fairly close control over who has access to their > systems > and for what purposes they use them, and usually try to present a > unified public front. GNU is not like that. > > Rather maybe think of it like a FOO.edu address. Actually, that's *exactly* how I think of it. The behaviour of a student with a FOO.edu address reflects on the institution of which they are a part, and it's in that sense that people with gnu.org addresses represent the FSF. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Whether those with gnu.org addresses in any way represent FSF 2006-06-14 11:18 ` [OT] Whether those with gnu.org addresses in any way represent FSF (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton @ 2006-06-14 12:29 ` Miles Bader 2006-06-14 12:33 ` Alastair Houghton 0 siblings, 1 reply; 37+ messages in thread From: Miles Bader @ 2006-06-14 12:29 UTC (permalink / raw) Cc: emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: >> Rather maybe think of it like a FOO.edu address. > > Actually, that's *exactly* how I think of it. The behaviour of a > student with a FOO.edu address reflects on the institution of which > they are a part, and it's in that sense that people with gnu.org > addresses represent the FSF. "Reflects on", sure, but rather weakly. Nobody's going to lose much sleep if a Harvard student flames somebody on a mailing list somewhere, and it won't have much effect on Harvard's reputation, because it's generally understood that there are lots of silly people at universities, and that no attempt is made to control their behavior. -Miles -- "Nah, there's no bigger atheist than me. Well, I take that back. I'm a cancer screening away from going agnostic and a biopsy away from full-fledged Christian." [Adam Carolla] ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Whether those with gnu.org addresses in any way represent FSF 2006-06-14 12:29 ` [OT] Whether those with gnu.org addresses in any way represent FSF Miles Bader @ 2006-06-14 12:33 ` Alastair Houghton 2006-06-14 12:58 ` nferrier 0 siblings, 1 reply; 37+ messages in thread From: Alastair Houghton @ 2006-06-14 12:33 UTC (permalink / raw) Cc: emacs-devel On 14 Jun 2006, at 13:29, Miles Bader wrote: > Alastair Houghton <alastair@alastairs-place.net> writes: >>> Rather maybe think of it like a FOO.edu address. >> >> Actually, that's *exactly* how I think of it. The behaviour of a >> student with a FOO.edu address reflects on the institution of which >> they are a part, and it's in that sense that people with gnu.org >> addresses represent the FSF. > > "Reflects on", sure, but rather weakly. Nobody's going to lose much > sleep if a Harvard student flames somebody on a mailing list > somewhere, > and it won't have much effect on Harvard's reputation, because it's > generally understood that there are lots of silly people at > universities, > and that no attempt is made to control their behavior. OK, but there aren't lots of silly people with gnu.org addresses. Very few, if any, I suspect. Kind regards, Alastair. -- http://www.alastairs-place.net ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [OT] Whether those with gnu.org addresses in any way represent FSF 2006-06-14 12:33 ` Alastair Houghton @ 2006-06-14 12:58 ` nferrier 0 siblings, 0 replies; 37+ messages in thread From: nferrier @ 2006-06-14 12:58 UTC (permalink / raw) Cc: emacs-devel, Miles Bader Alastair Houghton <alastair@alastairs-place.net> writes: > On 14 Jun 2006, at 13:29, Miles Bader wrote: > >> Alastair Houghton <alastair@alastairs-place.net> writes: >>>> Rather maybe think of it like a FOO.edu address. >>> >>> Actually, that's *exactly* how I think of it. The behaviour of a >>> student with a FOO.edu address reflects on the institution of which >>> they are a part, and it's in that sense that people with gnu.org >>> addresses represent the FSF. >> >> "Reflects on", sure, but rather weakly. Nobody's going to lose much >> sleep if a Harvard student flames somebody on a mailing list >> somewhere, >> and it won't have much effect on Harvard's reputation, because it's >> generally understood that there are lots of silly people at >> universities, >> and that no attempt is made to control their behavior. > > OK, but there aren't lots of silly people with gnu.org addresses. > Very few, if any, I suspect. I am extreemly silly. -- Nic Ferrier http://www.tapsellferrier.co.uk for all your tapsell ferrier needs ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-12 15:02 ` Alastair Houghton 2006-06-12 22:58 ` David Kastrup @ 2006-06-12 22:58 ` Thien-Thi Nguyen 1 sibling, 0 replies; 37+ messages in thread From: Thien-Thi Nguyen @ 2006-06-12 22:58 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel Alastair Houghton <alastair@alastairs-place.net> writes: > I'm happy to admit that I missed that part of the documentation, > though I'm don't appreciate the undertone of cheekiness in your > last remark, particularly not from someone with a gnu.org e-mail > address. Maybe it wasn't intended that way, but that's how it > came across. what do you expect from people w/ a gnu.org e-mail address? what does that expectation have to do w/ not reading the docs properly? if the docs are unclear to you in some way, please explain how so. thi ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-09 12:00 asm-mode patch to allow per-file comment character setting from file locals Alastair Houghton 2006-06-11 21:20 ` Stefan Monnier @ 2006-06-13 12:19 ` Masatake YAMATO 2006-06-13 23:20 ` Richard Stallman 1 sibling, 1 reply; 37+ messages in thread From: Masatake YAMATO @ 2006-06-13 12:19 UTC (permalink / raw) Cc: emacs-devel > Hi there, > > Here's a short patch to asm-mode.el that I use so that I can easily > vary the comment style used for assembly language files on a per-file > basis. This is particularly useful on Mac OS X, where the Intel and > PowerPC versions of the system assembler use different comment > characters (I believe the PowerPC version actually accepts both ';' > and '#', but the Intel one certainly requires '#'). > > An example of its use: > > ### > ### Local Variables: > ### asm-comment-char: ?\# > ### End: > ### > > Here's the patch: Interesting. I have met with the same situation when I read linux/arch/*/*.S files. Font lock rules of asm-mode are not enough for the situation. So I tried to write modes derived from asm-mode for each architecture/asm syntax. I refer the info file of gas to know the asm syntaxes, so I called the derived modes gas-*-mode, here * is a name of architecture. You can do like: M-x gas-i386-mode , M-x gas-ppc-mode or M-x gas-arm-mode if you want to hack iPod:-P If your asm file is at /foo/bar/i386/baz.s or /foo/bar/ppc/baz.s, gas-i386-mode or gas-ppc-mode is automatically selected. Masatake YAMATO (require 'asm-mode) (require 'assoc) (defgroup gas nil "Architecture specific mode for editing assembler code." :group 'asm) (defcustom gas-mode-hook nil "*Hook that gets run after the gas mode ." :type 'hook :group 'asm) (defvar gas-mode-architecture-history nil) (defun gas-mode (&optional architecture) "Wrapper for gas-*-mode." (interactive (list (let ((md (gas-choose-mode-automatically))) (if current-prefix-arg (completing-read "Architecture: " gas-machine-dependents nil t md 'gas-mode-architecture-history md) (gas-choose-mode-automatically))))) (unless (interactive-p) (setq architecture (gas-choose-mode-automatically))) (if architecture (let* ((machine-dependent (aget gas-machine-dependents architecture)) (mode-func (nth 0 machine-dependent)) (asm-comment-chars (car (nth 1 machine-dependent)))) (call-interactively mode-func)) (asm-mode)) (run-mode-hooks 'gas-mode-hook)) (defvar gas-machine-dependents nil) (defun gas-register-machine-dependent (name comment-chars register-prefix-chars immediate-prefix-chars extra-symbol-chars statement-separator-char auto-mode) (let ((mode-func (intern (format "gas-%s-mode" name)))) (aput 'gas-machine-dependents name (list mode-func comment-chars auto-mode)) (eval `(define-derived-mode ,mode-func asm-mode ,(format "Gas/%s" name) ,(format "%s specific asm mode" name) :syntax-table (gas-make-syntax-table ',comment-chars ',register-prefix-chars ',immediate-prefix-chars ',extra-symbol-chars ',statement-separator-char) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults (list (gas-make-font-lock-keywords ',comment-chars ',register-prefix-chars ',immediate-prefix-chars ',extra-symbol-chars ',statement-separator-char))))))) (defun gas-choose-mode-automatically () (catch 'found (dolist (md gas-machine-dependents) (let ((auto-mode (nth 3 md))) (when (eq auto-mode t) (setq auto-mode (car md))) (cond ((and (stringp auto-mode) (buffer-file-name)) (when (string-match auto-mode (buffer-file-name)) (throw 'found (car md)))) ((functionp auto-mode) (when (funcall 'auto-mode) (throw 'found (car md))))))))) (defun gas-make-syntax-table (comment-chars register-prefix-chars immediate-prefix-chars extra-symbol-chars statement-separator-char) (let ((st (copy-syntax-table asm-mode-syntax-table))) (mapc (lambda (c) (modify-syntax-entry c "< b" st)) comment-chars) (mapc (lambda (c) (modify-syntax-entry c "'" st)) register-prefix-chars) (mapc (lambda (c) (modify-syntax-entry c "'" st)) immediate-prefix-chars) (mapc (lambda (c) (modify-syntax-entry c "w" st)) ; "_"? extra-symbol-chars) (mapc (lambda (c) (modify-syntax-entry c " " st)) statement-separator-char) st)) (defun gas-make-font-lock-keywords (comment-chars register-prefix-chars immediate-prefix-chars extra-symbol-chars statement-separator-chars) (let ((rp (when register-prefix-chars (cons (concat "[" (mapconcat 'char-to-string register-prefix-chars "") "]" "\\sw+") font-lock-variable-name-face))) (ip (when immediate-prefix-chars (cons (concat "[" (mapconcat 'char-to-string immediate-prefix-chars "") "]" "\\(?:\\s_\\|\\sw\\)+") font-lock-constant-face))) (pattern)) (when rp (push rp pattern)) (when ip (push ip pattern)) (append pattern asm-font-lock-keywords))) ;; c:comment-char ;; r:register-prefix-chars ;; i:immediate-prefix-chars ;; sym:extra-symbol-chars ;; sep:statement-separator-char ;; am: regexp for auto mode selection. ;; name c r i sym sep am (gas-register-machine-dependent "alpha" '(?#) '(?$) nil nil '(?\;) t) (gas-register-machine-dependent "arm" '(?@) nil '(?# ?$) '(?_ ?\\) '(?\;) t) (gas-register-machine-dependent "cris" '(?\; ?#) '(?$) nil nil '(?\@) t) ;; frv??? (gas-register-machine-dependent "frv" '(?\; ?#) nil nil nil nil t) (gas-register-machine-dependent "h8300" '(?\;) '(?@) '(?#) '(?_) '(?\$) t) ;; #include doesn't work well. (gas-register-machine-dependent "i386" '(?#) '(?%) '(?$) nil '(?\;) "i386\\|x86_64") ;; comment is broken (gas-register-machine-dependent "ia64" nil nil nil nil '(?\;) t) (gas-register-machine-dependent "m32r" '(?\;) '(?@) '(?#) '(?+) nil t) (gas-register-machine-dependent "m68k" '(?\|) '(?%) '(?#) '(?@) nil "68k") (gas-register-machine-dependent "mips" '(?#) '(?$) nil '(?@) nil t) (gas-register-machine-dependent "parisc" '(?\;) '(?%) nil '(?$) '(?!) t) (gas-register-machine-dependent "ppc" nil nil nil nil '(?\;) "powerpc\\|ppc") (gas-register-machine-dependent "s390" '(?#) '(?%) nil nil nil t) (gas-register-machine-dependent "sh" '(?!) '(?@) '(?#) '(?$ ?-) '(?\;) t) (gas-register-machine-dependent "sparc" '(?!) '(?%) nil nil '(?\;) t) (gas-register-machine-dependent "v850" '(?#) nil nil nil '(?\;) t) (gas-register-machine-dependent "xtensa" '(?#) '(?$) nil nil '(?\;) t) (add-to-list 'auto-mode-alist '("\\.[sS]\\'" . gas-mode)) (provide 'gas-mode) ;; gas-mode.el ends here ^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: asm-mode patch to allow per-file comment character setting from file locals 2006-06-13 12:19 ` Masatake YAMATO @ 2006-06-13 23:20 ` Richard Stallman 0 siblings, 0 replies; 37+ messages in thread From: Richard Stallman @ 2006-06-13 23:20 UTC (permalink / raw) Cc: alastair, emacs-devel When you have a construct such as gas-register-machine-dependent that generates a defun, it should be a macro, not a function. The macro name should start with `def'. And the name of the function it defines should not be constructed like this (let ((mode-func (intern (format "gas-%s-mode" name)))) Instead, the name of the function should appear as the first argument of the macro. Those are general principles for Lisp programming which ought to be applied here. Comparing the usefulness for editing of these two proposed extensions to asm mode is a different question. It would be useful for those who are interested in such things to compare them and state their opinions. ^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2006-06-17 17:57 UTC | newest] Thread overview: 37+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-06-09 12:00 asm-mode patch to allow per-file comment character setting from file locals Alastair Houghton 2006-06-11 21:20 ` Stefan Monnier 2006-06-12 9:46 ` Alastair Houghton 2006-06-12 13:12 ` David Kastrup 2006-06-12 15:02 ` Alastair Houghton 2006-06-12 22:58 ` David Kastrup 2006-06-13 10:36 ` Alastair Houghton 2006-06-13 17:56 ` Eli Zaretskii 2006-06-13 19:27 ` [OT] Netiquette (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton 2006-06-13 22:21 ` Thien-Thi Nguyen 2006-06-14 11:25 ` Alastair Houghton 2006-06-14 3:30 ` Eli Zaretskii 2006-06-14 10:53 ` Alastair Houghton 2006-06-14 12:04 ` [OT] Netiquette David Kastrup 2006-06-14 15:31 ` Alastair Houghton 2006-06-14 15:43 ` Sam Steingold 2006-06-14 16:28 ` Alastair Houghton 2006-06-14 16:35 ` Sam Steingold 2006-06-14 18:09 ` Thien-Thi Nguyen 2006-06-14 16:17 ` Chong Yidong 2006-06-14 16:26 ` David Kastrup 2006-06-14 16:40 ` Alastair Houghton 2006-06-14 17:32 ` Sam Steingold 2006-06-15 8:30 ` Richard Stallman 2006-06-15 8:57 ` Alastair Houghton 2006-06-16 6:01 ` Richard Stallman 2006-06-16 18:48 ` asm-mode comment char patch (was: [OT] Netiquette) Alastair Houghton 2006-06-17 17:57 ` Richard Stallman 2006-06-15 1:58 ` [OT] Netiquette Miles Bader 2006-06-14 5:11 ` asm-mode patch to allow per-file comment character setting from file locals Miles Bader 2006-06-14 11:18 ` [OT] Whether those with gnu.org addresses in any way represent FSF (was: Re: asm-mode patch to allow per-file comment character setting from file locals) Alastair Houghton 2006-06-14 12:29 ` [OT] Whether those with gnu.org addresses in any way represent FSF Miles Bader 2006-06-14 12:33 ` Alastair Houghton 2006-06-14 12:58 ` nferrier 2006-06-12 22:58 ` asm-mode patch to allow per-file comment character setting from file locals Thien-Thi Nguyen 2006-06-13 12:19 ` Masatake YAMATO 2006-06-13 23:20 ` Richard Stallman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.