From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: replacing a function with another one Date: Sun, 09 Mar 2014 20:10:46 +0100 Message-ID: <87zjkz6vd5.fsf@web.de> References: <87vbvofsi6.fsf@yun.yagibdah.de> <87bnxgs4r9.fsf@web.de> <87lhwj1cfz.fsf@yun.yagibdah.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1394392278 17673 80.91.229.3 (9 Mar 2014 19:11:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Mar 2014 19:11:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 09 20:11:27 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WMj8A-00040u-Er for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Mar 2014 20:11:26 +0100 Original-Received: from localhost ([::1]:45178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMj8A-0000rJ-0A for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Mar 2014 15:11:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMj7t-0000r8-Lf for help-gnu-emacs@gnu.org; Sun, 09 Mar 2014 15:11:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMj7n-0002If-GU for help-gnu-emacs@gnu.org; Sun, 09 Mar 2014 15:11:09 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMj7n-0002IX-A8 for help-gnu-emacs@gnu.org; Sun, 09 Mar 2014 15:11:03 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WMj7m-0003hF-Db for help-gnu-emacs@gnu.org; Sun, 09 Mar 2014 20:11:02 +0100 Original-Received: from ip-90-187-97-239.web.vodafone.de ([90.187.97.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Mar 2014 20:11:02 +0100 Original-Received: from michael_heerdegen by ip-90-187-97-239.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Mar 2014 20:11:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-90-187-97-239.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:cWS43ZyCGQzuBPg7AZmXpr0miD0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96356 Archived-At: lee writes: > Defadvice shines. I wonder who invented that ... The file header says it was Hans Chalupsky. Note that defadvice has now been obsoleted by a new implementation: nadvice.el. You can do all of the stuff that defadvice can, but it has cleaner and simpler syntax and semantics. If this is new to you, you may want to start learning with the new mechanism. > And re-defining functions just like that? IsnĀ“t that a rather > dangerous and potentially troublesome feature? Generally you should try to avoid it as much as possible and only use it when there is no other mean to reach what you want. If you know what you are doing, it - in my experience - seldom causes trouble. Critical are changes in the sources that change syntax or semantic of the original function, so expect that some of your advices may stop working in future Emacs releases. Regards, Michael.