all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xue Fuqiao <xfq@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Xue Fuqiao <xfq@gnu.org>, William Stevenson <yhvh2000@gmail.com>,
	10772@debbugs.gnu.org
Subject: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode
Date: Thu, 27 Feb 2014 06:40:37 +0800	[thread overview]
Message-ID: <87ppm9qyze.fsf@gnu.org> (raw)
In-Reply-To: <jwvtxblopbx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 26 Feb 2014 10:40:58 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Tcl is not special wrt to filling and comments, AFAIK, so tcl-mode
>>> should simply use the default auto-fill functionality without any
>>> local tweaks.
>> Right, and that's exactly what my patch does.
>
> No, it preserves the "special behavior", just changing the
> implementation to rely on the generic auto-fill code.  My point is that
> the special behavior is just a preference of the mode's author and hence
> doesn't belong in the major mode's definition.

Ah, I see.  So here's the new patch (without ChangeLog/NEWS):

=== modified file 'lisp/progmodes/tcl.el'
--- lisp/progmodes/tcl.el	2014-02-10 01:34:22 +0000
+++ lisp/progmodes/tcl.el	2014-02-26 22:39:06 +0000
@@ -1410,13 +1410,8 @@
 		     tcl-application file tcl-command-switches)
 	(if and-go (switch-to-tcl t)))))))
 
-(defun tcl-auto-fill-mode (&optional arg)
-  "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'."
-  (interactive "P")
-  (auto-fill-mode arg)
-  (if auto-fill-function
-      (set (make-local-variable 'comment-auto-fill-only-comments) t)
-    (kill-local-variable 'comment-auto-fill-only-comments)))
+(define-obsolete-function-alias tcl-auto-fill-mode
+  auto-fill-mode "24.4")
 
 (defun tcl-electric-hash (&optional count)
   "Insert a `#' and quote if it does not start a real comment.

-- 
http://www.gnu.org/software/emacs/





  reply	other threads:[~2014-02-26 22:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  6:49 bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode William Stevenson
2012-02-09 15:18 ` Juanma Barranquero
2012-02-09 22:09 ` Stefan Monnier
2012-02-11 15:27   ` William Stevenson
2012-02-12  5:12     ` Stefan Monnier
2014-02-25 13:30       ` Xue Fuqiao
2014-02-25 14:30         ` Stefan Monnier
2014-02-25 22:25           ` Xue Fuqiao
2014-02-26 15:40             ` Stefan Monnier
2014-02-26 22:40               ` Xue Fuqiao [this message]
2014-02-27  2:55                 ` Stefan Monnier
2014-02-27 17:00                 ` Glenn Morris
2014-02-27 22:33                   ` Xue Fuqiao
2016-02-24  6:42                     ` Lars Ingebrigtsen
2017-06-03  3:45                 ` npostavs
2017-06-28  0:38                   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppm9qyze.fsf@gnu.org \
    --to=xfq@gnu.org \
    --cc=10772@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yhvh2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.