Changeset 5254:992f4b55d339


Ignore:
Timestamp:
07/01/07 19:28:36 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Parents:
5245:2b14ba7eb3fe (diff), 5253:4be54a6a85a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge in tom's code.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • sage/server/notebook/config.py

    r5208 r5254  
    1515 
    1616js.keyhandler.add('request_introspections', key = "KEY_SPC",  ctrl=True)  # control space 
    17 js.keyhandler.add('request_introspections', key = "KEY_TAB")  # tab 
     17js.keyhandler.add('request_introspections', key = "KEY_TAB", shift=False)  # tab 
     18js.keyhandler.add('indent', key = "KEY_TAB", shift=False)  # tab 
     19js.keyhandler.add('unindent', key = "KEY_TAB", shift=True)  # tab 
    1820js.keyhandler.add('request_history',     key = "KEY_Q", ctrl=True) 
    1921js.keyhandler.add('request_history',     key = "KEY_QQ", ctrl=True) 
  • sage/server/notebook/config.py

    r5253 r5254  
     1"""nodoctest 
     2Customization of the Notebook 
     3""" 
     4 
    15############################################################################# 
    26#       Copyright (C) 2007 William Stein <wstein@gmail.com> 
     
    59#                  http://www.gnu.org/licenses/ 
    610############################################################################# 
    7  
    8 """ 
    9 Customization of the Notebook 
    10 """ 
    1111 
    1212#from js import JSKeyHandler 
  • sage/server/notebook/js.py

    r5208 r5254  
    211211var function_pat = "([a-zA-Z_][a-zA-Z._0-9]*)\\([^()]*$";  
    212212var one_word_pat = "([a-zA-Z_][a-zA-Z._0-9]*)"; 
    213  
     213var unindent_pat = "^\\s{0,4}(.*)$"; 
    214214var whitespace_pat = "(\\s*)"; 
    215215 
     
    220220  one_word_pat = new RegExp(one_word_pat); 
    221221  whitespace_pat = new RegExp(whitespace_pat); 
     222  unindent_pat = new RegExp(unindent_pat); 
    222223} catch(e){} 
    223224 
     
    14151416       evaluate_cell(id, 1); 
    14161417       return false; 
    1417     } else if (key_request_introspections(e)) { 
     1418    } else if (key_unindent(e)) { //unfortunately, shift-tab needs to get caught before not-shift tab 
     1419       unindent_cell(cell_input); 
     1420       return false; 
     1421    } else if (key_request_introspections(e) && cell_input.selectionStart == cell_input.selectionEnd) { 
    14181422       // command introspection (tab completion, ?, ??) 
    14191423       evaluate_cell(id, 2); 
    14201424       focus_delay(id,true); 
     1425       return false; 
     1426    } else if (key_indent(e)) { 
     1427       indent_cell(cell_input); 
    14211428       return false; 
    14221429    } else if (key_interrupt(e)) { 
     
    15221529} 
    15231530 
     1531function indent_cell(input) { 
     1532    if(browser_ie) { 
     1533    } else { 
     1534        var start = 1+input.value.lastIndexOf("\n", input.selectionStart); 
     1535        var a = input.value.substring(0, start); 
     1536        var b = input.value.substring(start, input.selectionEnd); 
     1537        var c = input.value.substring(input.selectionEnd); 
     1538        var lines = b.split("\n"); 
     1539        for(var i = 0; i < lines.length; i++) 
     1540            lines[i] = "    "+lines[i]; 
     1541        b = lines.join("\n"); 
     1542        input.value = a+b+c; 
     1543        input.selectionStart = a.length; 
     1544        input.selectionEnd = a.length + b.length;; 
     1545    } 
     1546} 
     1547 
     1548function unindent_cell(input) { 
     1549    if(browser_ie) { 
     1550    } else { 
     1551        var start = 1+input.value.lastIndexOf("\n", input.selectionStart); 
     1552        var a = input.value.substring(0, start); 
     1553        var b = input.value.substring(start, input.selectionEnd); 
     1554        var c = input.value.substring(input.selectionEnd); 
     1555        var lines = b.split("\n"); 
     1556        for(var i = 0; i < lines.length; i++) 
     1557            lines[i] = unindent_pat.exec(lines[i])[1];  //square brackets pull the captured pattern 
     1558        b = lines.join("\n"); 
     1559        input.value = a+b+c; 
     1560        input.selectionStart = a.length; 
     1561        input.selectionEnd = a.length + b.length;; 
     1562    } 
     1563} 
     1564 
    15241565function worksheet_command(cmd) { 
    15251566   return ('/home/' + worksheet_filename + '/' + cmd); 
  • sage/server/notebook/js.py

    r5253 r5254  
    1 r""" 
     1r"""nodoctest 
    22Javascript (AJAX) Component of SAGE Notebook 
    33 
  • sage/server/notebook/worksheet.py

    r5208 r5254  
    702702            cells = [self._new_cell()] 
    703703 
     704        self.__cells = cells 
     705 
     706        # This *depends* on self.__cells being set!! 
    704707        self.set_cell_counter() 
    705708             
    706         self.__cells = cells 
    707709 
    708710 
  • sage/server/notebook/worksheet.py

    r5252 r5254  
    1 """ 
     1"""nodoctest 
    22A Worksheet. 
    33 
  • setup.py

    r5211 r5254  
    876876                     'sage.matrix', 
    877877#                     'sage.matrix.padics', 
    878                       
     878                     'sage.media', 
    879879                     'sage.misc', 
    880880                      
  • setup.py

    r5246 r5254  
    6464#####################################################     
    6565         
    66 ec =    Extension('sage.libs.ec.ec', 
    67               sources = ["sage/libs/ec/ec.pyx"] +  \ 
    68                         ["sage/libs/ec/%s"%s for s in \ 
    69                          ["analrank.c", "apcompute.c", "arderivs.c", 
    70                           "arintern.c", "arith.c", "artwists.c", 
    71                           "arutil.c", "checkit.c", "degphi.c",  
    72                           "diskio.c", "docurve.c", "dodisk.c",  
    73                           "equation.c", "exotic.c", "fixit.c",  
    74                           "iisog2.c", "iisog3.c", "isog.c", "isog2.c", 
    75                           "isog23.c", "isog24.c", "isog3.c", "isog5.c", 
    76                           "isog52.c", "isog713.c", "isogNprime.c", 
    77                           "isoggen.c", "isogsort.c", "isogx0.c",  
    78                           "isogx0branch.c", "isogx0branch1.c",  
    79                           "isogx0branch2.c", "isogx0branch3.c", 
    80                           "isogx0branch4.c", "isogx0branch5.c",  
    81                           "isogx0branch6.c", "isogx0getd.c",  
    82                           "isogx0period.c", "readit.c", 
    83                           "special.c", "util.c"]],  
    84               libraries = ["pari", "m"]) 
    85  
    8666hanke = Extension(name = "sage.libs.hanke.hanke", 
    8767              sources = ["sage/libs/hanke/hanke.pyx", 
     
    174154libsingular = Extension('sage.libs.singular.singular', 
    175155                        sources = ['sage/libs/singular/singular.pyx'], 
    176                         libraries = ['gmp', 'm', 'readline', 'singular', 'singfac', 'singcf', 'omalloc'], 
     156                        libraries = ['gmp', 'm', 'readline', 'singular', 'singfac', 'singcf', 'omalloc', 'givaro', 'gmpxx'], 
    177157                        language="c++", 
    178158                        ) 
     
    329309    #vector_rational_sparse, 
    330310 
    331     ec,  
    332311    pari,  
    333312 
     
    434413    Extension('sage.rings.polynomial.multi_polynomial_libsingular', 
    435414              sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx'], 
    436               libraries = ['gmp', 'm', 'readline', 'singular', 'singcf', 'singfac', 'omalloc'], 
     415              libraries = ['gmp', 'm', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx'], 
    437416              language="c++", 
    438417              ), \ 
     
    892871                     'sage.libs.mwrank', 
    893872                     'sage.libs.ntl', 
    894                      'sage.libs.ec', 
    895873                     'sage.libs.pari', 
    896874                     'sage.libs.singular', 
Note: See TracChangeset for help on using the changeset viewer.