help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Example use of macro to minimize and generalize the code (2)


From: Jean Louis
Subject: Example use of macro to minimize and generalize the code (2)
Date: Tue, 1 Jun 2021 00:45:43 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-05-31 22:21]:

> What kind of things or problems could or should you solve with
> macros?

Another good use of a macro is with the database application where:

- database user can define the type of the object, for example,
  database user "joe" could create new type named "bc evaluation"

- the type of the object is accessible to user only, not to other
  users; 

- user edits the type and declares that the value should be evaluated
  with the external program named "bc". Such declaration could be
  simple "bc" instead of complex programming

- macro generates a function specific for that user who needs to see
  the output from "bc evaluation"

Thus it becomes a program that develops itself further based on
users's input. 

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]