File: quote.js

package info (click to toggle)
conkeror 1.0.3%2Bgit170123-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,988 kB
  • sloc: ansic: 280; sh: 255; xml: 173; makefile: 69
file content (49 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
 * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
 * (C) Copyright 2008-2010 John J. Foerch
 *
 * Use, modification, and distribution are subject to the terms specified in the
 * COPYING file.
**/

define_buffer_mode("quote-next-mode",
    function enable (buffer) {
        buffer.override_keymaps([quote_next_keymap]);
    },
    function disable (buffer) {
        buffer.override_keymaps();
    },
    $display_name = "QUOTE-NEXT",
    $doc = "This mode sends the next key combo to the buffer, bypassing "+
        "normal key handling.  It disengages after one key combo.");

interactive("quote-next-mode-disable",
    "Disable quote-next-mode.",
    function (I) {
        quote_next_mode.disable(I.buffer);
        I.buffer.set_input_mode();
    });


define_buffer_mode("quote-mode",
    function enable (buffer) {
        buffer.override_keymaps([quote_keymap]);
    },
    function disable (buffer) {
        buffer.override_keymaps();
    },
    $display_name = "QUOTE",
    $doc = "This mode sends all key combos to the buffer, "+
        "bypassing normal key handling, until the escape "+
        "key is pressed.");


interactive("quote-mode-disable",
    "Disable quote-mode.",
    function (I) {
        quote_mode.disable(I.buffer);
        I.buffer.set_input_mode();
    });


provide("quote");