Parse key binding commands. More...
#include "config.h"#include <stdbool.h>#include <string.h>#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "commands.h"#include "editor/lib.h"#include "index/lib.h"#include "menu/lib.h"#include "pager/lib.h"#include "parse/lib.h"#include "dump.h"#include "get.h"#include "init.h"#include "keymap.h"#include "menu.h"#include "notify.h"
Include dependency graph for commands.c:Go to the source code of this file.
Data Structures | |
| struct | ParseUnbind |
| Parsed 'unbind' or 'unmacro' command. More... | |
Functions | |
| enum CommandResult | parse_dump (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse 'bind' and 'macro' commands - Implements Command::parse() -. | |
| char * | parse_keymap (const struct Command *cmd, struct MenuDefinitionArray *mda, struct Buffer *line, struct Buffer *err) |
| Parse a user-config key binding. | |
| void | parse_menu (struct MenuDefinitionArray *menus, const char *s, struct Buffer *err) |
| Parse menu-names into an array. | |
| enum CommandResult | parse_push (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'push' command - Implements Command::parse() -. | |
| enum CommandResult | parse_bind (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'bind' command - Implements Command::parse() -. | |
| void | set_default_bindings (const struct MenuDefinition *md) |
| Set some safe default keybindings. | |
| const char * | notify_binding_name (enum NotifyBinding ev) |
| Get the name for a NotifyBinding. | |
| bool | parse_unbind_args (const struct Command *cmd, struct Buffer *line, struct Buffer *err, struct ParseUnbind *args) |
| Parse the 'unbind' and 'unmacro' commands. | |
| bool | parse_unbind_exec (const struct Command *cmd, struct ParseUnbind *args, struct Buffer *err) |
| Execute the 'unbind' or 'unmacro' command. | |
| enum CommandResult | parse_unbind (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'unbind' and 'unmacro' commands - Implements Command::parse() -. | |
| enum CommandResult | parse_macro (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'macro' command - Implements Command::parse() -. | |
| enum CommandResult | parse_exec (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe) |
| Parse the 'exec' command - Implements Command::parse() -. | |
Parse key binding commands.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file commands.c.
| char * parse_keymap | ( | const struct Command * | cmd, |
| struct MenuDefinitionArray * | mda, | ||
| struct Buffer * | line, | ||
| struct Buffer * | err ) |
Parse a user-config key binding.
| cmd | Command being processed |
| mda | Array for results |
| line | Buffer containing config string |
| err | Buffer for error messages |
| ptr | Key string for the binding |
Expects to see: <menu-string>,<menu-string>,... <key-string>
Definition at line 115 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void parse_menu | ( | struct MenuDefinitionArray * | menus, |
| const char * | s, | ||
| struct Buffer * | err ) |
Parse menu-names into an array.
| menus | Array for results |
| s | String containing menu-names |
| err | Buffer for error messages |
Expects to see: <menu-string>[,<menu-string>]
Definition at line 175 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void set_default_bindings | ( | const struct MenuDefinition * | md | ) |
Set some safe default keybindings.
| md | Menu Definition to update |
Definition at line 351 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| const char * notify_binding_name | ( | enum NotifyBinding | ev | ) |
Get the name for a NotifyBinding.
| ev | Event type |
| str | Name of the NotifyBinding |
Definition at line 409 of file commands.c.
Here is the caller graph for this function:| bool parse_unbind_args | ( | const struct Command * | cmd, |
| struct Buffer * | line, | ||
| struct Buffer * | err, | ||
| struct ParseUnbind * | args ) |
Parse the 'unbind' and 'unmacro' commands.
| [in] | cmd | Command being parsed |
| [in] | line | Text to parse |
| [out] | err | Buffer for error messages |
| [out] | args | Parsed args |
| true | Success |
Command unbinds:
unbind *unbind index *unbind indexunbind index,pager *unbind index,pagerunbind index junbind index,pager junbind * jThe same applies to unmacro.
Definition at line 449 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool parse_unbind_exec | ( | const struct Command * | cmd, |
| struct ParseUnbind * | args, | ||
| struct Buffer * | err ) |
Execute the 'unbind' or 'unmacro' command.
| true | Success |
The user is trying to remove a binding or a macro. We choose not to distinguish the two, since a key can only be bound to one or the other. i.e. unbind will also clear macros, unmacro will also clear bindings
Definition at line 537 of file commands.c.
Here is the call graph for this function:
Here is the caller graph for this function: