From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.emacs.help Subject: Re: In "C" mode, how do I turn off electric mode? Date: Mon, 26 Nov 2007 18:22:49 -0800 Organization: Private Message-ID: <474B7F79.5080108@gmail.com> References: <47486275.1090006@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196130201 24637 80.91.229.12 (27 Nov 2007 02:23:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2007 02:23:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Bruce Korb Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 27 03:23:28 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iwq6f-0006WW-SL for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Nov 2007 03:23:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iwq6Q-0008RC-Jn for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 21:23:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iwq6B-0008R6-FG for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 21:22:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iwq6A-0008Qu-2O for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 21:22:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iwq69-0008Qr-QW for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 21:22:53 -0500 Original-Received: from flpi195.sbcis.sbc.com ([207.115.20.197] helo=flpi195.prodigy.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iwq69-0006Rt-P5 for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 21:22:54 -0500 X-ORBL: [75.0.177.73] Original-Received: from [192.168.1.101] (adsl-75-0-177-73.dsl.pltn13.sbcglobal.net [75.0.177.73]) by flpi195.prodigy.net (8.13.8 out.dk.spool/8.13.8) with ESMTP id lAR2MnQt010275; Mon, 26 Nov 2007 18:22:49 -0800 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) In-Reply-To: <47486275.1090006@gmail.com> X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49566 Archived-At: I know I probably seem cranky. I am feeling cranky, after all. I mean, I've used this wonderful editor for over 20 years and it has been getting better all the time. Until I loaded version 22.1 that came with my SuSE installation. I really do find it irritating that I have to go find and eyeball parse this stuff: > ;; Safe local variables: > ;; > ;; For variables defined by major modes, the safety declarations can go into > ;; the major mode's file, since that will be loaded before file variables are > ;; processed. > ;; > ;; For variables defined by minor modes, put the safety declarations in the > ;; file defining the minor mode after the defcustom/defvar using an autoload > ;; cookie, e.g.: > ;; > ;; ;;;###autoload(put 'variable 'safe-local-variable 'stringp) > ;; > ;; Otherwise, when Emacs visits a file specifying that local variable, the > ;; minor mode file may not be loaded yet. > ;; > ;; For variables defined in the C source code the declaration should go here: > > (mapc (lambda (pair) > (put (car pair) 'safe-local-variable (cdr pair))) > '((buffer-read-only . booleanp) ;; C source code > (default-directory . stringp) ;; C source code > (fill-column . integerp) ;; C source code > (indent-tabs-mode . booleanp) ;; C source code > (left-margin . integerp) ;; C source code > (no-update-autoloads . booleanp) > (tab-width . integerp) ;; C source code > (truncate-lines . booleanp))) ;; C source code > > (put 'c-set-style 'safe-local-eval-function t) > > (defun hack-local-variables-confirm (vars unsafe-vars risky-vars) > (if noninteractive > nil > (let ((name (if buffer-file-name only to discover that there really does not seem to be any way to shut up this damn "hack-local-variables-confirm" junk. Except to rewrite the thing and have it do nothing. What a pain. I mean, really! It is not a good interface to force all competent users to say, "Mother, please may I?" every time some new variable is encountered. As best I can tell from my ability meander around this stuff, there is no other way. So, I surely hope you do not change the name of that procedure that I am about to replace. And I would still like to be able to press the space bar and not have my comment reformatted: Bruce Korb wrote: > c-toggle-electric-state > > does not seem to do the trick. I try to put text into a comment, > and the electric mode is so helpful, it is impossible to do it, except > by using text mode in another buffer and pasting it into my C code. > What is going on? What are the emacs developers thinking? > STOP BEING SO HELPFUL. IT IS NOT HELPFUL. I JUST WANT TO EDIT > MY TEXT. SOME ASSISTS ARE NICE BUT THIS IS WAY OVER THE LINE. > ARGHHHH!!!!!!!!!!! Here is an example. I pressed "enter" and "*" and got this: /*=event power_fail_received * evt-sev: debug * evt-class: debug * display: 'received regarding ' * ' from node : ' * * arg: enum-pfail_evt_type_name, evt_type * arg: enum-pfail_evt_type_desc, text_id * * arg: tpd_u32, src_node * arg: tpd_u32, disk_id * arg: tpd_u32, tag_type * =*/ Normally, I would expect the star to be "electric" and line up. But I am also trying to disable electric mode because there is simply too much magic involved. So, okay, I had to press "tab", but it is still weird: * arg: tpd_u32, tag_type * =*/ So, I move the cursor in front of the "*" character and press "space-bar": * arg: tpd_u32, tag_type *=*/ and the cursor remains on the this new star, but on the next line. There is some magical property somewhere. What nonsense is this? "describe-key" says that "space-bar" is still bound to "insert-self", but that is obviously not true. How can I do simple stuff without resorting to X-clip/paste, changing modes to edit comments, reverting my distribution to a back-rev emacs or just punting my favorite editor and using VI? :( This is really way too painful.